20 Mart 2023 Pazartesi

Cache Stratejileri - Cache Access Patterns Read-Through

Giriş
Şeklen şöyle


MapLoader kullanılır. Açıklaması şöyle. Uygulama sadece Cache'e erişir. Cache gerekiyorsa, veri tabanından sorgulama yapar.
1. The App never interacts with DB directly but always via Cache.
2. On a cache miss, the cache will read from DB and enrich the cache storage.
3. On a cache hit, data is served from the cache.

You can see, the DB is reached very infrequently and the response is fast since the caches are mostly in-memory (Redis/ Memcached). 
Avantajı
Açıklaması şöyle
Keeps cache consistently populated by handling misses automatically

Read-Through ve Request Collapsing Kavramı
Bir nesne için aynı anda çok fazla istek gelirse, Cache veri tabanına çok fazla sayıda istek gönderir. Bu isteklerin birleştirilmesine Request Collapsing deniliyor.

Cache-aside Okuma vs Read-Through
Şeklen şöyle

Hiç yorum yok:

Yorum Gönder