cache

A store of earlier answers kept close to where they are needed so they can be reused instead of fetched or computed again.

In more detail

A cache is only correct if it knows how long an answer stays true and when to check again. Caches save time at the cost of possibly serving stale data.

Examples

Inventory plugins can cache host lists, and fact caching stores gathered facts between runs.
In AWS: A fast, temporary copy of data kept close to where it is needed so it does not have to be fetched or calculated again.
Suspense data fetching needs a cache so every render reads the same promise for the same resource; TanStack Query and SWR provide one.

Related terms

Taught in

References

Certification courses