0

I am learning the cache in a distributed system design. I am confused by the write-around cache.

This technique(write-around cache) is similar to write-through cache, but data is written directly to permanent storage, bypassing the cache.

All the blog and tutorial only mention that the write directly goes to database, but not mentioning what to do with the cache afterward. If it does nothing to cache, the "cache strategy" here is totally non-sense. Is there any procedure like syncing the database to cache in every some interval?

combo combo
  • 85
  • 1
  • 7
  • When the application get a cache miss, i.e. key does not exist in cache, it retrieves data from permanent storage, and update the key, value pair into cache with an expire set. Check [this](https://stackoverflow.com/questions/45384889/how-to-keep-caching-up-to-date/45385486#45385486) for detail. – for_stack Jan 30 '22 at 07:16
  • the explanation of above is a good example. However, there are also write-behind caches https://docs.redis.com/latest/modules/redisgears/write-behind/ where the data from the cache is persisted back to another database. And Change Data Capture https://medium.com/globant/change-data-capture-with-debezium-6eb523d57b1c where changes from the database are propagated to the cache – namizaru Feb 01 '22 at 18:24

0 Answers0