Cache TTL consideration

By | May 21, 2021
Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  1. When there is no eviction mechanism, we can use ttl to invalidate. But this is based on that cache might have stale data.
  2. TTL doesn’t lead 100% cache correctness. If we want to guarantee cache correctness, we need evection mechanism, write-through etc strategies.
  3. In theory, TTL is just a way of data replacement. Others are LRU, LFU.