Class MRUCache
java.lang.Object
NetStrategies.CacheStrategy
NetStrategies.CacheStrategies.MRUCache
- All Implemented Interfaces:
AutoCheck
MRU (Most Recently Used) cache eviction strategy: discards the most recently used items first.
-
Field Summary
Fields inherited from class CacheStrategy
engine, netSystem, removeItemMode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRemoveItem(LinkedList<CacheItem> caches) MRU discards the most-recently-used items first.Methods inherited from class CacheStrategy
check, getRemoveItemMode, setNetSystem, setRandomEngine, setRemoveItemMode
-
Constructor Details
-
MRUCache
public MRUCache()
-
-
Method Details
-
getRemoveItem
MRU discards the most-recently-used items first. At the 11th VLDB conference, Chou and DeWitt said: "When a file is being repeatedly scanned in a [looping sequential] reference pattern, MRU is the best replacement algorithm." It is most useful in situations where the older an item is, the more likely it is to be accessed.- Specified by:
getRemoveItemin classCacheStrategy- Parameters:
caches- the list of the cached items.- Returns:
-