Fix cache related install errors

Preload cache was not properly cleared after module and extension
installation, resulting in errors.