Is there any way of using Memcached for fragment caching in Rails?
+1
A:
You can set the fragment_cache_store in your environment.rb
ActionController::Base.cache_store = ActiveSupport::Cache::MemCacheStore.new()
http://api.rubyonrails.org/classes/ActionController/Caching.html#M000628
TonyLa
2008-11-03 16:48:02
you should be careful setting it in environment.rb, your development.rb can overwrite it with perform_caching=false, i think it's better to put it in development.rb
Brian Armstrong
2009-06-23 20:13:59
+2
A:
you can add this to your development.rb and it should do fragment caching as well as the others
config.action_controller.perform_caching = true
config.cache_classes = true
config.cache_store = :mem_cache_store
Brian Armstrong
2009-06-23 20:14:43