The cache participates in every write#
Write-through coordinates the cache and backing store before acknowledging success according to the implementation. The cached value stays warm, but the cache becomes part of the critical write path.
- Benefit: a following read can find the new cached value.
- Cost: every write pays cache and persistence latency, even if the value is never read.
- Failure question: what state is visible when one update succeeds and the other fails?
Use these prompts to extend the design. The useful answer is a reasoned change, not a memorized sentence.
- Which component reports success?
- Can a cache failure reject an otherwise valid write?
- How is a partial write detected and repaired?
- Is keeping every written value warm worth the memory?
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- Caching challenges and strategiesAmazon Builders' Library
Reach this point to mark the lesson as read.