Also, using appropriate cache headers and putting a Varnish cache in front of the Rack server would be far easier and faster and would also reduce the load on the Rack server itself. Oh, but then I couldn't say I created a DSL...
Calling it a DSL is bit weird to me, it's a single instance method. You'd use the same kind of thing to set the appropriate caching headers for Varnish.
Note: I know I'm responding to someone who is probably already aware of this information, but the crashly slides are lite on the techniques technical side.
Leonid is bringing up some good points, but I was always wondering: How do you get to do auto-expiring page-caching.
While Leonid is right that Action Caching with Rails.cache is much easier to do, action caching still lets the request hit the stack, while it does not do so with this proposed solution. Page caching makes the expiration of the cache harder then this solution.
Question: It seems this solution has nearly the ease of action caching, but the performance gain like page caching. Is there a low-level gem/solution available to do something like this?
Also, using appropriate cache headers and putting a Varnish cache in front of the Rack server would be far easier and faster and would also reduce the load on the Rack server itself. Oh, but then I couldn't say I created a DSL...