Class SimpleCacheProperties
java.lang.Object
org.apereo.cas.configuration.model.core.cache.SimpleCacheProperties
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ExpiringSimpleCacheProperties
@RequiresModule(name="cas-server-core-util",
automated=true)
public class SimpleCacheProperties
extends Object
implements Serializable
This is
SimpleCacheProperties
.- Since:
- 7.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
This cache size specifies the maximum number of entries the cache may contain.int
This cache capacity sets the minimum total size for the internal data structures.setCacheSize
(long cacheSize) This cache size specifies the maximum number of entries the cache may contain.setInitialCapacity
(int initialCapacity) This cache capacity sets the minimum total size for the internal data structures.
-
Constructor Details
-
SimpleCacheProperties
public SimpleCacheProperties()
-
-
Method Details
-
getCacheSize
public long getCacheSize()This cache size specifies the maximum number of entries the cache may contain. Note that the cache may evict an entry before this limit is exceeded or temporarily exceed the threshold while evicting. As the cache size grows close to the maximum, the cache evicts entries that are less likely to be used again. For example, the cache may evict an entry because it hasn't been used recently or very often. Note: to disable the cache, you may choose a cache size of0
. -
getInitialCapacity
public int getInitialCapacity()This cache capacity sets the minimum total size for the internal data structures. Providing a large enough estimate at construction time avoids the need for expensive resizing operations later, but setting this value unnecessarily high wastes memory. -
setCacheSize
This cache size specifies the maximum number of entries the cache may contain. Note that the cache may evict an entry before this limit is exceeded or temporarily exceed the threshold while evicting. As the cache size grows close to the maximum, the cache evicts entries that are less likely to be used again. For example, the cache may evict an entry because it hasn't been used recently or very often. Note: to disable the cache, you may choose a cache size of0
.- Returns:
this
.
-
setInitialCapacity
This cache capacity sets the minimum total size for the internal data structures. Providing a large enough estimate at construction time avoids the need for expensive resizing operations later, but setting this value unnecessarily high wastes memory.- Returns:
this
.
-