What a cache buys you
A cache is a fast store sitting in front of a slow one. The trade you're making: memory for time, accepting that the cached copy can lag the source.
What you should expect:
- 10โ1000x lower latency on hits.
- 10โ100x lower cost per read at scale (a cache hit doesn't touch your DB).
- A new failure mode: stale data. Cached copies can disagree with the source of truth.
"There are only two hard things in Computer Science: cache invalidation and naming things." โ Phil Karlton. Naming is jokingly the harder one; invalidation is the one that actually keeps people awake.
