Caching
Storing the result of an expensive operation so the next request gets it instantly instead of redoing the work.
Reviewed by the RadarTrek editorial team · June 2026
Caching saves the result of a slow operation — a database query, an API call, a rendered page — somewhere fast (often in-memory, like Redis) so subsequent requests skip the expensive work entirely. The hard part isn't storing the value, it's invalidation: deciding when a cached value is stale and needs to be refreshed or thrown away.
Why it matters
- —"There are only two hard problems in caching: cache invalidation, and off-by-one errors" — invalidation strategy matters more than the caching mechanism itself.
- —Cache-aside (check cache, miss, fetch, store) is the most common pattern and the easiest to reason about when starting out.
- —A cache with no expiry (TTL) is a slow-motion bug waiting to serve stale data indefinitely.
Where to learn this
Caching Strategies
System Design for Builders course
This is the exact lesson that covers this term in depth — with examples, diagrams, and a hands-on exercise.