Sean C. wrote:
ResponseCache.instance should do the trick.
Earlier today I tried:
cache = ResponseCache.instance
… and also …
Both deleted all the files from my /public directory instead of my
/cache directory. What seemed to be happening was that I was creating a
new instance of ResponseCache, which I believe by default Rails assigns
/public as the cache directory, hence the killing of my files.
This seemed weird to me because the following (when used during any
extension’s activation method) properly overrides the value set in
/config/environments/development.rb for all pages in the website:
ResponseCache.defaults[:perform_caching] = false