Class SimpleLRUCache<K,​V>

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<K,​V>

    public final class SimpleLRUCache<K,​V>
    extends LinkedHashMap<K,​V>
    A very simplistic LRU cache based on LinkedHashMap. It grows up to the size specified in the constructor, evicting least recently accessed entries to keep the size there.
    See Also:
    Serialized Form
    • Constructor Detail

      • SimpleLRUCache

        public SimpleLRUCache​(int maxEntries)
      • SimpleLRUCache

        public SimpleLRUCache​(int initialSize,
                              float loadFactor,
                              int maxEntries)