Is my Rack::Cache misconfigured?

754 Views Asked by At

I'm caching the most visited page on my Rails app using HTTP caching and etags.

This is reliant on Rack::Cache, and I recently discovered I'm not explicitly setting the storage configuration for Rack::Cache anywhere in my config files or initializers (specifically, I don't have the config.action_dispatch.rack_cache bit of code anywhere, as discussed in this Heroku guide).

My implementation of HTTP caching appears to be working i.e. if a page is not modified, a logged out user gets the pages back with a 304 Not Modified response.

I fired up a Rails console from my server (in development, staging, and production), ran MyApp::Application.config.action_dispatch.rack_cache, and this is what it came back with:

=> {:metastore=>"rails:/", :entitystore=>"rails:/", :verbose=>false}

I've only ever encountered memcache, file:/, or heap:/ as options for metastore and entitystore. Never rails:/ - there's no mention of it here.

Is my Rack::Cache misconfigured? What does rails:/ mean?

0

There are 0 best solutions below