20 Mart 2023 Pazartesi

Cache Stratejileri - Cache Access Patterns Write-Behind veya Write Back

Giriş
Şeklen şöyle

Aslında Write-Through ile aynıdır. Tek fark veri tabanı güncellemesi senkron değil asenkron yapılır
Açıklaması şöyle
Write-behind approach is very much similar to write-through, just that the database write calls are asynchronous in fashion.
Açıklaması şöyle
In a write-behind cache, a write request only updates the cache. Then another background process asynchronously updates the DB with the new entries in the cache. The asynchronous DB update can be implemented as periodic batch update, and the workload can be scheduled to run during mid-night, i.e. when the DB load is low.
Açıklaması şöyle
first write into database and then into cache.
Avantajı
Açıklaması şöyle
In write-heavy environments where slight data loss is tolerable


Hiç yorum yok:

Yorum Gönder