Skip to content
Commitwise
Menu

Caching

Also called: Cache

Keeping a copy of data somewhere faster, so you don't fetch or compute it again every time.

Definition

A cache stores results close to where they are needed: in memory, on disk, in Redis or on a CDN. It makes reads faster and reduces load on the source, at the cost of data that may be stale. Every cache needs a plan for invalidation (when to throw old data away) and a size limit.

In practice

An image loader keeps recently shown thumbnails in an in-memory LRU cache, so scrolling back up doesn't re-download them.

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.