Which cache invalidation strategy immediately removes or updates cached data when the original data changes?
Think about which strategy keeps cache and database synchronized instantly.
Write-through caching updates the cache at the same time as the database, ensuring immediate consistency.
A news website updates articles frequently but can tolerate slight delays in showing updates. Which cache invalidation strategy best balances freshness and performance?
Consider a strategy that automatically expires cache after a set time.
TTL expiration allows cached data to live for a set time, balancing freshness and reducing load.
In a distributed system with multiple cache nodes, which cache invalidation approach helps maintain consistency without excessive network overhead?
Think about reducing network chatter while keeping caches updated.
A centralized invalidation service with async notifications reduces network load and keeps caches consistent efficiently.
Which statement correctly describes a tradeoff when using lazy invalidation compared to write-through caching?
Consider how each strategy affects latency and data freshness.
Lazy invalidation delays cache updates, lowering write latency but risking stale reads until invalidation.
You manage a cache for a product catalog updated on average every 10 minutes. Cache misses cost 100ms extra latency, and stale data causes 1% user dissatisfaction. Which TTL expiration time balances latency and freshness best?
Think about reducing stale data while minimizing cache misses.
5 minutes TTL reduces stale data exposure and limits cache misses, balancing user experience and performance.