Glossary

Cache-Aside

The app checks the cache first; on a miss it reads the DB and populates the cache (lazy loading).

1 min read·4 sections
Open the interactive version → diagrams, practice & more

Definition

The app checks the cache first; on a miss it reads the DB and populates the cache (lazy loading).

How it works

The most common caching pattern (a.k.a. lazy-loading). Only requested data is cached, so it stays small, but the first request after a miss/expiry is slow and a burst of misses can stampede the DB. Writes invalidate or update the key. Contrast with write-through, which fills the cache on write.

Common questions

What is Cache-Aside?

The app checks the cache first; on a miss it reads the DB and populates the cache (lazy loading).

How does Cache-Aside work?

The most common caching pattern (a.k.a. lazy-loading). Only requested data is cached, so it stays small, but the first request after a miss/expiry is slow and a burst of misses can stampede the DB. Writes invalidate or update the key. Contrast with write-through, which fills…

What is Cache-Aside used for in system design?

The most common caching pattern (a.k.a. lazy-loading). Only requested data is cached, so it stays small, but the first request after a miss/expiry is slow and a burst of misses can stampede the DB. Writes invalidate or update the key. Contrast with write-through, which fills…

Part of Glossary on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Browse the glossary and "X vs Y" comparisons, or build this one →