public interface CachingManager
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CACHE_ATTACHMENTS
Name of the attachment cache.
|
static java.lang.String |
CACHE_ATTACHMENTS_COLLECTION
Name of the collection attachment cache.
|
static java.lang.String |
CACHE_ATTACHMENTS_DYNAMIC
Name of the dynamic attachment cache.
|
static java.lang.String |
CACHE_DOCUMENTS
Name of the rendering cache.
|
static java.lang.String |
CACHE_PAGES
Name of the page cache.
|
static java.lang.String |
CACHE_PAGES_HISTORY
Name of the page history cache.
|
static java.lang.String |
CACHE_PAGES_TEXT
Name of the page text cache.
|
static java.lang.String |
PROP_CACHE_CONF_FILE
The property value with the location of the cache configuration file.
|
static java.lang.String |
PROP_CACHE_ENABLE
The property value for setting the cache on/off.
|
static java.lang.String |
PROP_USECACHE_DEPRECATED
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
enabled(java.lang.String cacheName)
Checks if the requested cache is enabled or not.
|
<T,E extends java.lang.Exception> |
get(java.lang.String cacheName,
java.io.Serializable key,
CheckedSupplier<T,E> supplier)
Returns an item from a cache.
|
CacheInfo |
info(java.lang.String cacheName)
Retrieves cache usage information.
|
<T extends java.io.Serializable> |
keys(java.lang.String cacheName)
Returns the list of keys from elements present in a cache.
|
void |
put(java.lang.String cacheName,
java.io.Serializable key,
java.lang.Object val)
Puts an item on a cache.
|
void |
remove(java.lang.String cacheName,
java.io.Serializable key)
Removes an item from a cache.
|
void |
shutdown()
Shuts down the underlying cache manager
|
@Deprecated static final java.lang.String PROP_USECACHE_DEPRECATED
PROP_CACHE_ENABLE.static final java.lang.String PROP_CACHE_ENABLE
static final java.lang.String PROP_CACHE_CONF_FILE
static final java.lang.String CACHE_ATTACHMENTS
static final java.lang.String CACHE_ATTACHMENTS_COLLECTION
static final java.lang.String CACHE_ATTACHMENTS_DYNAMIC
static final java.lang.String CACHE_PAGES
static final java.lang.String CACHE_PAGES_TEXT
static final java.lang.String CACHE_PAGES_HISTORY
static final java.lang.String CACHE_DOCUMENTS
void shutdown()
boolean enabled(java.lang.String cacheName)
cacheName - The cache to be queried.true if the cache is enabled, false otherwise.CacheInfo info(java.lang.String cacheName)
cacheName - The cache to be queried.null if the requested cache is not enabled.<T extends java.io.Serializable> java.util.List<T> keys(java.lang.String cacheName)
cacheName - The cache to be queried.<T,E extends java.lang.Exception> T get(java.lang.String cacheName, java.io.Serializable key, CheckedSupplier<T,E> supplier) throws E extends java.lang.Exception
null.cacheName - The cache in which the item lives.key - item's identifier.supplier - if the element is not cached, try to retrieve from the cached system.null if either the cache is not enabled or the item is not present on the cache / cached service.E - the supplier may throw a checked exception, which is propagated upwards.E extends java.lang.Exceptionvoid put(java.lang.String cacheName, java.io.Serializable key, java.lang.Object val)
cacheName - The cache in which the item will live.key - item's identifier.val - item to insert in the cache.void remove(java.lang.String cacheName, java.io.Serializable key)
cacheName - The cache in which the item to be removed lives.key - item's identifier.Copyright (c) 2001-2021 The Apache Software Foundation. All rights reserved.