Cache Aside
Read through an application-managed cache while keeping a durable source of truth.
Problem
Repeated derived or database reads are expensive or slow.
When to use it
- Staleness is bounded and acceptable
- Misses can safely fall back
When not to use it
- Money or reservation decisions
- Invalidation cannot be made safe
Minimal example
Read cache; on miss read DB and set TTL. On write commit DB then invalidate versioned key.
Tradeoffs
- Stale reads and stampedes
- Needs TTL, invalidation, and negative-cache policy