Cache

A cache stores recently or frequently used data in a faster location so future access is quicker.

Intuition

A cache keeps likely-needed information close by to avoid repeating expensive work.

Technical definition

Caching is a storage strategy that trades memory and invalidation complexity for lower access latency or reduced recomputation.

Example

A web app may cache API responses to avoid repeated database queries.

Common misunderstandings

  • Caches create consistency and invalidation problems.
  • A stale cache can be worse than no cache for some data.

Need this inside a product?

The studio builds the systems these terms describe. Tell us what you are working on.