Always refresh the cache if the view files is changed.

Also, enable the cache only if we're not in development mode.