Class OgnlDefaultCache<K,V>

java.lang.Object
org.apache.struts2.ognl.OgnlDefaultCache<K,V>
Type Parameters:
K - The type for the cache key entries
V - The type for the cache value entries
All Implemented Interfaces:
OgnlCache<K,V>

public class OgnlDefaultCache<K,V> extends Object implements OgnlCache<K,V>

Basic OGNL cache implementation.

This implementation is backed by a ConcurrentHashMap that is cleared whenever the eviction limit is surpassed.

Setting a very high eviction limit simulates an unlimited cache.

Setting too low an eviction limit will make the cache ineffective.

  • Constructor Details

    • OgnlDefaultCache

      public OgnlDefaultCache(int evictionLimit, int initialCapacity, float loadFactor)
  • Method Details