Cache

Cache Coherency

Cache coherencyĀ is the uniformity of shared resource data that ends up stored in multipleĀ local caches

Pasted image 20220921132302.png

Incoherent Cache Incoherent Cache

Coherent Cache Coherent Cache

Solutions

Saw this in SE464.

Three basic solutions:

  • Expire cache entries after a certain TTL (time to live)
  • After writes, send new data or an invalidation message to all caches
  • This creates a coherent cache. But it adds performance overhead.
  • Donā€™t every change your data! For example, create a new filename every time you add new data. This is called versioned data.