better rails caching

I’m pleased to release Interlock, a Rails plugin for maintainable and high-efficiency caching. Documentation is here.

what it does

Interlock uses memcached to make your view fragments and associated controller blocks march along together. If a fragment is fresh, the controller behavior won‘t run. This eliminates duplicate effort from your request cycle. Your controller blocks run so infrequently that you can use regular ActiveRecord finders and not worry about object caching at all.

Interlock automatically tracks invalidation dependencies based on the model lifecyle, and supports arbitrary levels of scoping per-block.


Interlock has full C0 test coverage and has been used in production on CHOW for five or six weeks already. We’ve seen 3-4x speedups on controllers that were already accelerated with Sphinx and cache_fu.

If you do have any problems (gosh), please report them on the forum instead of the blog comments.

Anyway, go read the docs; everything is there. In closing, here is a lolcat I made with my own kitten. He’s new: