0 votes
in Technology by (1.7m points)
How to Reading/Writing to Cache?

1 Answer

0 votes
by (1.7m points)

In distributed caching, Cache Coherence refers to the problem of keeping the data in caches consistent. There are two general strategies for dealing with writes to a cache:

Write-through – all data written to the cache is also propagated to the main memory at the same time.

Write-back – when data is written to a cache, a dirty bit is set for the affected block. The modified block is written to memory only when the block is replaced.

Write-through caches are simpler, and they automatically deal with the cache coherence problem. But, they increase bus traffic significantly. Write-back caches are more common where higher performance is desired.