Package org.apache.struts2.ognl
Interface OgnlCache<K,V>
- Type Parameters:
K- The type for the cache key entriesV- The type for the cache value entries
- All Known Implementing Classes:
OgnlCaffeineCache,OgnlDefaultCache,OgnlLRUCache
public interface OgnlCache<K,V>
A basic cache interface for use with OGNL processing (such as Expression, BeanInfo). Implementation must be
thread-safe. All OGNL caches will have an eviction limit, but setting an extremely high value can simulate an
"effectively unlimited" cache.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()default VcomputeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) intvoidvoidputIfAbsent(K key, V value) voidsetEvictionLimit(int cacheEvictionLimit) intsize()
-
Method Details
-
get
-
computeIfAbsent
- Since:
- 7.1
-
put
-
putIfAbsent
-
size
int size() -
clear
void clear() -
getEvictionLimit
int getEvictionLimit() -
setEvictionLimit
void setEvictionLimit(int cacheEvictionLimit)
-