RSS

The Reverend

This is my new sandbox... I might pee here, too.
Jun 02
Permalink

Rails 2.1 Action Caching

Ok, as a little disclaimer, I haven’t used a *ton* of action caching, so this may be old news to everyone out there, but just in case there’s someone out there wondering about where the cached fragments go, here’s what I dug out of the Rails source earlier today:

Configuration examples (MemoryStore is the default): 

ActionController::Base.cache_store = :memory_store 

ActionController::Base.cache_store = :file_store, "/path/to/cache/directory" 

ActionController::Base.cache_store = :drb_store, "druby://localhost:9192" 

ActionController::Base.cache_store = :mem_cache_store, "localhost" 

ActionController::Base.cache_store = MyOwnStore.new("parameter") 

I found that little helpful bit of info here: http://dev.rubyonrails.org/changeset/8393