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)


layout 'admin'
caches_action :show, :layout => false

def show
render :layout => 'application'

def update
expire_action :action => :show

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.

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/3WnkHmrdepAJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
postedJan 26, '12 at 11:53a
activeJan 26, '12 at 11:53a

1 user in discussion

Yellowreign: 1 post



site design / logo © 2022 Grokbase