Fragment Caching with Memcached

Is there a way to use memcached to cache fragments in Rails?

+4
source share
2 answers

You can set the fragment_cache_store file in your environment. rb

ActionController::Base.cache_store = ActiveSupport::Cache::MemCacheStore.new() 

http://api.rubyonrails.org/classes/ActionController/Caching.html#M000628

+2
source

you can add this to your development.rb and it should do fragment caching as well as others

 config.action_controller.perform_caching = true config.cache_classes = true config.cache_store = :mem_cache_store 
+7
source

All Articles