What are different cache eviction policies?
Here they are:
First In First Out (FIFO): The cache evicts the object which was added to cache first, no matter if at what frequency or how often it is being accessed.
Last In First Out (LIFO): The cache evicts the object being added to cache most recently.
Least Recently Used (LRU): Discards the least recently used items first.
Most Recently Used (MRU): Discards, in contrast to LRU, the most recently used items first.
Least Frequently Used (LFU): Counts how often an item is needed. Those that are used least often are discarded first.
Random Replacement (RR): Randomly selects a candidate item and discards it to make space when necessary.