NOTE

Cache Replacement Policies

LRU, LFU, FIFO, random and modern approximate policies, with workload-dependent hit-rate trade-offs.

Data Structures & AlgorithmsCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

When a bounded cache is full, an eviction policy chooses what to remove.

  • LRU favors recent reuse;
  • LFU favors frequently reused items;
  • FIFO is simple but ignores reuse;
  • random can be cheap and surprisingly competitive;
  • production caches often use approximate/admission-aware hybrids.

No policy dominates every workload. Capacity, object size, scan resistance, metadata overhead, TTL, and access distribution determine hit rate and latency.

Loading helpful count