Class SessionCache
A specialized cache for managing
Session objects, allowing efficient storage
and retrieval of session instances using unique string keys. The cache has a fixed
capacity and employs an underlying caching mechanism to manage its entries.- Since:
- 3.3.0-SNAPSHOT
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSessionCache(int capacity) Constructs a newSessionCachewith a specified maximum capacity. -
Method Summary
Methods inherited from class de.craftsblock.craftscore.cache.Cache
clear, containsKey, entrySet, get, keySet, moveToFront, put, remove, size, toString, values
-
Constructor Details
-
SessionCache
public SessionCache(int capacity) Constructs a newSessionCachewith a specified maximum capacity.The capacity defines the maximum number of sessions that can be held in the cache. When the capacity is exceeded, the cache evicts the least recently used entry.
- Parameters:
capacity- the maximum number of sessions the cache can hold.
-
-
Method Details
-
getOrNew
-