Leastfrequentlyused
Leastfrequentlyused (often referred to as Least Frequently Used or LFU) is a cache eviction policy that replaces the item with the smallest access frequency when space is needed. Each cached item has a frequency counter; on a hit the counter increments, and newly inserted items start at one. When the cache is full, the item with the lowest frequency is evicted to make room for a new one. LFU aims to keep data that is accessed more often resident, assuming past frequency predicts future usefulness.
Efficient LFU implementations avoid scanning all items at eviction time. Common approaches include bucketed frequency lists,
LFU performs well under stable workload patterns where a small set of items remains popular. It can