What is the difference between LRU and LFU

Let’s consider a constant stream of cache requests with a cache capacity of 3, see below: If we just consider a Least Recently Used (LRU) cache with a HashMap + doubly linked list implementation with O(1) eviction time and O(1) load time, we would have the following elements cached while processing the caching requests as … Read more

tech