Class LRUCache<K,V>

java.lang.Object
com.sun.faces.util.LRUCache<K,V>

public class LRUCache<K,V> extends Object
LRU Cache adapted to the code style of Faces
Author:
Paolo Bernardi
  • Constructor Details

  • Method Details

    • get

      public V get(K key)
      get from cache if exists else init the value + save in cache + return created value
      Parameters:
      key - the key
      Returns:
      the value from cache if exists, otherwise the newly created and saved value
    • clear

      public void clear()
      clear the cache
    • remove

      public V remove(K key)
      remove an element identified by the passed key from the cache