Caching

A cache sits between you and the truth. These lessons explore what happens when caches evict, expire, stampede, or go stale — and the strategies that keep them honest.

01
LRU EVICTION
Discard whoever you haven't talked to in the longest time
L214 MIN
02
CACHE STAMPEDE
When a popular key expires, everyone races to recompute
L215 MIN
03
WRITE-THROUGH vs WRITE-BACK
Safety vs speed — pick one, lose the other
L214 MIN
04
CACHE-ASIDE
The app owns the caching logic — and the staleness risk
L215 MIN
05
TTL, JITTER & NEGATIVE CACHING
A thousand keys set at once expire at once
L112 MIN
06
CDN & CACHE INVALIDATION
You purged the origin, and the edge is still serving yesterday
L215 MIN
07
CAPSTONE: CACHE A FEED WITH READ-YOUR-WRITES
Everything in this path, in one timeline
L320 MIN