LFU
LFU, or Least Frequently Used, is a cache eviction policy that removes the item that has been accessed the fewest times. It uses frequency counts to guide which entry to drop when space is needed, aiming to keep items that are accessed more often in the cache.
In a typical LFU implementation, each cached item stores a counter representing its access frequency. On every
Efficient LFU implementations often use a two-level data structure: a map from keys to their values and
Variants and related concepts include LFUDA (LFU with aging), which decays frequencies over time to prevent
Applications include web caches, database buffers, and memory management systems where access frequency is a meaningful