liveBook · Manning

Write-through caching

Write-through caching is a caching strategy that synchronously writes each update to both the cache and its backing store before acknowledging it.

How 3 Manning books explain it

Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

Write-through caching is a caching technique that writes updated data synchronously to both the cache and the primary data store.

How it is used
Keeps cached application data aligned with database updates so later reads can use the caching layer.
How deep it goes
Explains the write-and-read flow, asynchronous-fill option, and memory limit, but gives no write-through configuration steps.
Examples
Uses a team-leaderboard capacity calculation and a figure comparing lazy loading with write-through caching.
What you can do after
Evaluate/understand when updating a cache alongside a data store helps freshness and when cache capacity poses a risk.

Read how Amazon Web Services in Action, Third Edition: An in-depth guide to AWS explains write-through caching →

Advanced Algorithms and Data Structures

Write-ahead caching writes data to a cache before writing it to the underlying storage system.

How it is used
Serves read-intensive workloads that repeatedly access data written once or infrequently.
How deep it goes
Defines simultaneous cache and storage writes, then contrasts latency, data-loss risk, and alternative cache policies.
Examples
Uses session data as the representative workload: infrequent writes followed by many near-term reads.
What you can do after
Apply it to favor near-zero data-loss risk and fast repeated reads when slower writes are acceptable.

Read how Advanced Algorithms and Data Structures explains write-through caching →

Learn Concurrent Programming with Go

Cache write-through is a cache update policy that immediately mirrors writes to the corresponding location in main memory.

How it is used
Explains how shared-memory writes reach main memory and remain visible across processor caches.
How deep it goes
Describes the update sequence and its stale-cache limitation, then connects the remedy to cache-coherency protocols.
Examples
Uses two threads updating and reading one shared variable across processor caches, supported by an architecture figure.
What you can do after
Evaluate why mirroring writes to memory does not alone prevent stale values in other processor caches.

Read how Learn Concurrent Programming with Go explains write-through caching →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.