Type of the key.
Type of the value.
Type of the arguments bundle.
Number of cache entries.
Clear all cache entries.
After successful clear, CacheEvent.FLUSH event will be emitted.
Delete key
and it's associated value.
After successful deletion, CacheEvent.DELETE event will be emitted.
Name of the key.
Get the value
associated with key
.
Name of the key.
Bundle of arguments passed by client for this operation.
Check if key
is present in the cache.
Name of the key.
Get all cache keys.
Unregister event listener.
Cache event.
Event listener.
Register event listener.
Cache event.
Event listener.
Insert/update key-value pair.
Due to auto fill nature of the cache, you can use this method explicitly set a value for the key and (maybe)
overwrite the value provided by retriever.
Key.
Value.
Arguments bundle.
Asynchronous implementation of the Cache, which auto fills itself by using KeyRetriever.
In case key was requested and it's missing, retriever will be called to obtain it's value which will be saved in the cache and then returned to client.
If you don't want to pass each time same arguments bundle for cache operations, you can provide a KeyConfigProvider. This function will be called each time an operation is performed on
key
. Returned arguments bundle will be forwarded to the underlying Cache implementation. This is especially useful for Cache.get operation which needs to automatically insert missing keys and use an arguments bundle for them.