Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Extract AP Page and Action caching from Rails #7833
This functionality will be available from
pd: I'm not sure about the name.
I'd like to understand the motivations behind moving this out of rails core. I had a brief exchange with @steveklabnik and understand that maybe developers should just be using Rack::Cache/Varnish + proper HTTP caching headers, but action caching also allows you hit your middleware and filter stack, which is useful for authentication.
I'm all for moving page caching out though, as it bypasses the Rails stack altogether.
Action caching relies on old-school manual expiration. No bueno. Much better to control your cache using key-based view and possibly controller based caches.
You're still free to use this through the plugin, but it's not a good fit for core any more. The state of the art moved on.
According to the rationale at rails#7833 (comment), we should recommend new users to follow DHH's approach outlined at http://37signals.com/svn/posts/3113-how-key-based-cache-expiration-works. This is the first step, and perhaps in the future we can write some specific recommendations out.