Forum: Ruby on Rails Can't Get Caching to Work with Heroku and Memcache

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5ff79a62688297a354a41d772f20a547?d=identicon&s=25 yellowreign (Guest)
on 2012-01-26 12:54
(Received via mailing list)
I'm on Heroku and trying to implement caching in my Rails app, but I'm
running into some problems that I don't understand. I thought it would
be
easy after reading the Rails Guide and Heroku docs on caching
strategies,
but apparently doing something wrong.

Issue 1: view of action doesn't seem to expire Issue 2: when I use
:layout
=> false, both my admin and app layout are used (trying to only get the
application layout)

Any help for this newbie would be most appreciated!

production.rb (also installed dalli per heroku documentation)

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 a product, but the show view
does not expire. So when I look at edit view for products, which I'm not
caching, I can see the change saved (just added a word to the title),
but
when I view show, it still has the old info.
This topic is locked and can not be replied to.