NancyFx/Nancy — pull request #941 by grumpydev (2013-02-01 13:32:04+00:00)
Title: Caching Changes

## Updated view and view location caching.

Removed the following:

* The view location cache - caching is now performed by the view locator itself, using a custom cache
* Removed (deprecated with an error) StaticConfiguration.DisabledCaches - replaced with settings in the StaticConfiguration.Caching class

Added the following:

* StaticConfiguration.Caching.EnableRuntimeViewDiscovery - allows new views to be discovered at runtime (i.e. drop new views onto the disk and they'll be picked up)
* StaticConfiguration.Caching.EnableRuntimeViewUpdates - allows views to be updated at runtime (i.e. edit a view template and it will be rebuilt)

Both these settings are set to true for Debug, and false for Release, although both can be set in the bootstrapper, or toggled from diagnostics. They are both disabled in release as we can assume our caches are immutable if they're off, which means we have no locks so faster performance (although the hit isn't massive). With the diagnostics toggling its easy to switch one or both on, update the files, then switch them back off again.

View updates currently not working with Spark because it seems to do its own caching and I couldn't figure out any way to fix it.