how to disable Rack::Cache in Rails 3.1

Couldn’t find this anywhere but what I found worked was to put this in config/application.rb:

    require 'rack/cache'
    config.middleware.delete Rack::Cache

This did fix the issue that sent me to this, as many people are likely to run into. The issue was that since Rack::Cache uses the default Rails FileStore that lots and lots of small files were being created in lots and lots of directories.  I don’t think Rack::Cache offers me much for this application, but if it did I would look into switching from a file store to a memory or memcached store.

One Comment

Leave a Reply to Tony Primerano Cancel reply

Your email address will not be published. Required fields are marked *