Cache

A Cache efficiently stores temporary objects primarily to improve an application's performance.

<p>Shiro doesn't implement a full Cache mechanism itself, since that is outside the core competency of a Security framework. Instead, this interface provides an abstraction (wrapper) API on top of an underlying cache framework's cache instance (e.g. JCache, Ehcache, JCS, OSCache, JBossCache, TerraCotta, Coherence, GigaSpaces, etc, etc), allowing a Shiro user to configure any cache mechanism they choose.

@since 0.2

Members

Functions

clear
void clear()

Clear all entries from the cache.

get
V get(K key)

Returns the Cached value stored under the specified {@code key} or {@code null} if there is no Cache entry for that {@code key}.

get
V get(K key, V value)
Undocumented in source.
keys
K[] keys()

Returns a view of all the keys for entries contained in this cache.

put
V put(K key, V value)

Adds a Cache entry.

remove
V remove(K key)

Remove the cache entry corresponding to the specified key.

size
int size()

Returns the number of entries in the cache.

values
V[] values()

Returns a view of all of the values contained in this cache.

Meta