write through
A caching strategy that writes every change to the cache and the database at the same time.
In more detail
The cache is never cold for written keys and stale reads after writes are avoided, but every write pays a second round trip. It suits data that is read soon after being written.
Related terms
- write behind — A caching strategy that writes to the cache first and copies the data to the database later.
- cache aside — A caching strategy where the application checks the cache, and on a miss reads the database and stores the result itself.
Taught in
- Caching Strategies And Topology — Scalable System Design & Distributed Architecture
- Cache Invalidation And The Three Hard Cases — Scalable System Design & Distributed Architecture