20 Mart 2023 Pazartesi

Cache Stratejileri - Cache Access Patterns Write-Through

Şeklen şöyle

Açıklaması şöyle. Yani önce veri tabanı güncellenir, sonra cache güncellenir
1. The application writes the data directly to the cache.
2. The cache updates the data in the main database. When the write is complete, both the cache and the database have the same value and the cache always remains consistent.
MapWriter kullanılır. Açıklaması şöyle
whenever any “write” request comes, it will come through the cache to the DB. Write is considered successful only if data is written successfully in the cache and in DB.
Açıklaması şöyle. Yani veri tabanı güncelleninceye kadar veri kilitlenir
The write-through strategy means that a write request first updates the DB, then updates the cache
...
Distributed lock is a critical component to guarantee atomic update to both the cache layer and the DB layer. 


Hiç yorum yok:

Yorum Gönder