Skip to content

3.5. Distributed Caching

A cache trades correctness for speed: it serves stale data fast to spare an expensive backend. That trade is almost always worth it and almost always underestimated, because the hard part is not the hit — it is invalidation, and the failure modes when the cache itself becomes a bottleneck or a thundering-herd amplifier. This chapter covers the caching strategies, invalidation approaches, Redis cluster architecture, and the stampede-prevention techniques that keep a cache miss from becoming an outage.