Class MRUCache

java.lang.Object
NetStrategies.CacheStrategy
NetStrategies.CacheStrategies.MRUCache
All Implemented Interfaces:
AutoCheck

public class MRUCache extends CacheStrategy
MRU (Most Recently Used) cache eviction strategy: discards the most recently used items first.
  • Constructor Details

    • MRUCache

      public MRUCache()
  • Method Details

    • getRemoveItem

      public CacheItem getRemoveItem(LinkedList<CacheItem> caches)
      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:
      getRemoveItem in class CacheStrategy
      Parameters:
      caches - the list of the cached items.
      Returns: