Chapter 12
Caching
Caching keeps a copy of data in a place that is faster or closer than the original source, so repeated requests are answered quickly and the source is protected. This chapter covers what a cache is, how read and write strategies work, how caches decide what to evict, and why stale data and stampedes are the hard parts.
Beginner
4 min2Caching Strategies and EvictionBeginner
3 min3Invalidation and Cache StampedeIntermediate
3 minChapter quiz
Caching · 5 questions
1.What is the main purpose of a cache?
2.How is hit ratio calculated?
3.Which write strategy risks losing data if the cache crashes?
4.Which policy evicts the entry unused for the longest time?
5.What is a cache stampede?
0 of 5 answered

