RailsCasts Pro episodes are now free!

Learn more or hide this

Steve Madsen's Profile

GitHub User: sjmadsen

Site: http://lightyearsoftware.com/

Comments by Steve Madsen

Avatar

OK, so the purpose is to reuse cached fragments between production deploys. In Capistrano terms, store them in shared, rather than current. That makes sense.

It still seems absurd to jump through those hoops in order to test that caching works in development mode. Testing gets great attention in the Ruby community. I'm surprised we don't have better coverage over this. I took a stab at it a three years ago with my Banker plug-in, but haven't maintained it. Perhaps I should turn it into a gem and modernize it.

Avatar

I don't understand the purpose of this gem at all.

Templates don't (or, at least, shouldn't) change in production, so there are no changes to detect.

Templates do change in development, however this gem requires extra code (explicit partial and collection arguments to render) and developer behavior changes (frequent server restarts).

I've wondered for years why there isn't better (any?) support for testing caching. Wouldn't it be better to have that than to jump through these hoops to test caching in development mode?