I am on Heroku and trying to implement caching in my Rails application, but I am having problems that I don’t understand. I thought it would be easy to read the Rails Guide and Heroku docs on caching strategies, but apparently something is wrong.
Problem 1: the type of action does not expire Problem 2: when I use: layout => false, both my admin and application layout are used (trying to get only the application layout)
Any help for this newbie would be greatly appreciated!
production.rb (dalli per heroku documentation is also installed)
config.cache_store = :dalli_store config.action_controller.perform_caching = true (added after reading http://bit.ly/oRKub1)
controller
layout 'admin' caches_action :show, :layout => false def show render :layout => 'application' end def update expire_action :action => :show end
I tried to test the expiration by changing the product, but the presentation does not expire. Therefore, when I look at the view view for products that I don’t cache, I see that the change is saved (just a word is added to the title), but when I view the show, it still has old information.
yellowreign
source share