stale data
Data that was correct when it was read or cached but no longer matches the source of truth because it has since changed.
In more detail
A list that still shows a deleted post after the delete succeeded is showing stale data. Writing a result calculated from stale data is how a lost update happens, and conditional writes can detect it. Invalidating the right cache entries after each change prevents most of it, while serving stale data on purpose can be a valid fallback when a dependency is down.
Related terms
- cache invalidation — Marking cached copies as out of date, or deleting them, when the real data changes so the next read fetches fresh data.
- cache — A store of earlier answers kept close to where they are needed so they can be reused instead of fetched or computed again.
- graceful degradation — Continuing to work with reduced features when part of the system fails, instead of failing completely.
- lost update — A concurrency bug where two sessions read the same value, both write a result based on it, and the later write silently erases the earlier one.
- compare and set — An update that changes a row only if it still holds the value the program expects, and reports whether it did.
Taught in
- Unified Build Pipelines: Caching & Dependency Graphs — Production Full-Stack Engineering
- Type-Safe Client Generation: Orval & Automated SDKs — Production Full-Stack Engineering
- Resilience Engineering: Circuit Breakers & Retries — Production Full-Stack Engineering
- Isolation Levels And The Lost Update — PostgreSQL, Indexing & Relational Data Modeling