Add a writeCache boolean option

This allows caching writing to be turned off for production systems so that the cache can be pre-generated during a build system and reducing locking on disk i/o.