How LFU Cache is Different From LRU Cache?
The primary difference between Least Frequently and Least Recently Used cache is that the former evicts the memory block with the lowest frequency, even if the block is just recently accessed. Whereas the latter removes the memory block that has not been referenced for the longest time.
Also, check out, Design an LRU Cache.