Reputation: 11336
I'm upgrading a Rails app 3 to 4 that relays heavily on action_caching due to traffic. caches_action
has been moved out from Rails 4 in favour or fragment caching and russian doll.
My question is what is the current solution to action cache? I see the current fragment caching is at least one way of magnitude slower since it is not caching anymore every action logic. My app went from below 200ms to over 2000ms without using caches_action
even if I'm using cache on the views.
I been searching but haven't found any article or documentation that digs deeper into this. Maybe i'm missing something obvious.
What is the current Rails 4 approach to action caching?
Upvotes: 4
Views: 1375
Reputation: 7303
I believe for people in your situation (code relying on action caching) the best solution is to use the actionpack-action_caching gem.
gem 'actionpack-action_caching'
caches_action :index, :show # should work again
Upvotes: 6