Pairs with Lesson 3: Cache Stampede.
| Term | Meaning |
|---|---|
| Cache-aside | App checks cache; on miss, reads source of truth, writes result to cache, returns it. Most common pattern. |
| Cache stampede / thundering herd | Many concurrent requests miss the same expired key at once, all hit the backing store simultaneously. |
| Single-flight | Coordination so only one in-flight request computes a given key's value at a time; others wait or get a fallback. |
| TTL (time to live) | How long a cached value is considered fresh before expiry. |
| Jitter | Randomized offset added to a timing decision (e.g. expiry) to spread out otherwise-synchronized events. |
| Stale-while-revalidate | Serve an expired value immediately while refreshing it in the background for future requests. |
| Lease (Facebook Memcache) | Token-based single-flight: cache grants a "lease" to the first miss; other misses get told to wait/retry instead of hitting the DB. |