Caches All the Way Down!
summary
CPU L1 hits are about half a nanosecond, RAM is ~200× slower, disk ~1500× slower and network ~1000× slower so fetching over the network can be ~300 million times slower than a CPU cache hit. The browser checks a memory cache first, then the HTTP cache and an h2 push cache, and service workers can use the service worker cache API to implement long-lived or hotel‑told invalidation. Use immutable assets (hash URLs + long max‑age like 3600s) or always‑revalidate short max‑age patterns.
AI-written summary · about
chapters (7)
- 0:00Introduction to caching
- 1:41Why caching is hard
- 6:56Browser and network caches
- 13:10Edge and origin server caches
- 16:54HTTP caching semantics
- 23:20Best practices and patterns
- 29:43Conclusion
related talks
30mBuilding Faster, More Resilient Apps with Service Worker: A Caching Strategy Deep Dive
36mCaching strategies and their performance footprint
32mThe ServiceWorker is coming, look busy
23mCacheCatalyst: Enhancing Web Caching for the Latency-Constrained Internet
39mOffline first!
25mCaching strategies on https://dev.to
42mHow Do Service Workers Even?
45mCaching in Applications Still Matters
