RailsCasts Pro episodes are now free!

Learn more or hide this

Cache Digests

#387 Cache Digests

Oct 20, 2012 | 7 minutes | Performance, Caching, Rails 4.0
The cache_digests gem (also included in Rails 4) will automatically add a digest to the fragment cache key based on the template. If a template changes the cache will auto-expire. But watch out for the gotchas!
  • Download:
  • source codeProject Files in Zip (61 KB)
  • mp4Full Size H.264 Video (16.2 MB)
  • m4vSmaller H.264 Video (8.08 MB)
  • webmFull Size VP8 Video (10.9 MB)
  • ogvFull Size Theora Video (16.8 MB)