Enabled caching if the cache directory is writable.

May want to ignore this with .gitignore.