cache aside
A caching strategy where the application checks the cache, and on a miss reads the database and stores the result itself.
In more detail
It is the default because it is easy to reason about. Writers update the database and delete the key. Its weakness is the exposed miss path: a cold cache or expiry sends traffic straight to the origin.
Related terms
- read through — A caching strategy where the cache itself fetches missing values from the database on the application's behalf.
- write through — A caching strategy that writes every change to the cache and the database at the same time.
- cache invalidation — Marking cached copies as out of date, or deleting them, when the real data changes so the next read fetches fresh data.
- miss rate — The share of requests a cache cannot answer, which all go on to the origin.
Taught in
- Caching Strategies And Topology — Scalable System Design & Distributed Architecture