**LFU (Least Frequently Used)** is an algorithm that determines how the data is handled when the cache is full. When the cache memory is full, LFU selects the data that is **least frequently used** and it's removed from the cache memory. Each cache element has the counter associated that helps algorithm tracks how frequently the data is accessed. If the cached element is accessed - the counter is incremented. When the cache memory is full - the element with the lowest counter is removed. If multiple elements have the same counter value, the algorithm use the secondary criteria to break the tie. ### See also 1. [[What is a LRU Cache?]] 2. [[What is the difference between LRU and LFU cache?]] ### Reference 1. [LFU Algorithm on AlgoCademy](https://algocademy.com/blog/cache-algorithms-fifo-vs-lru-vs-lfu-a-comprehensive-guide/#lru)