How to implement the LRU (cache) algorithm
Published in
3 min readMar 16, 2024
When we are implementing any caching technique in our architecture, it is essential to know what is the best eviction policy that makes sense to use.
LRU cache — Least Recently Used
The LRU policy evicts the object that was less accessed lately, keeping the other objects more accessed lately.