Caching strategies on https://dev.to
summary
Dev runs a server‑rendered Ruby on Rails app serving ~1M developers and speeds pages by combining Fastly edge caching with shielding, fragment and Russian‑doll caching in Redis, and browser fingerprinted assets with long max‑age and purge via Fastly API. Examples include serving articles from the edge while fetching live reaction counts separately, fragment keys that include article_last_commented_at to purge comments, and background counter updates (counterculture) to avoid expensive relationship queries.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 4:16What is Dev and caching
- 7:24Benefits of caching
- 9:13What data should and shouldn't be cached
- 11:43Risks of bad caching
- 14:12Response caching strategies
- 15:38Edge caching deep dive
- 23:10Shielding origin load
- 27:24Expiring and purging cache
- 32:44Fragment caching for views
- 36:58Russian doll caching
- 39:07Browser caching for assets
- 41:13Misc caching techniques
- 43:40Key questions before caching
- 46:06Conclusion
related talks
25mCaching strategies on https://dev.to
28mEdge Caching Dynamic Rails Apps
21mHigh Performance APIs through Caching
40mLiving on the Edge
38mThe power of cache in a slow world
08mAdvanced SSR Caching with React
24mCache for Commerce Performance and Optimization for High Volume Sales
37mCaching Deep Dive: The Ultimate Way To Speed up Your GraphQL API
