The type of keys used in the cache
The type of metadata associated with cached values, extends object
Creates a new instance of MemoryCacheStore.
Configuration options for the memory cache store
Maximum number of entries allowed in the cache. Must be a non-negative integer.
Maximum size of a single entry in bytes. Must be a non-negative integer.
Maximum total size of all entries in bytes. Must be a non-negative integer.
Returns the current byte size of the cache
The size of the cache in bytes
Gets the total number of entries stored in the memory cache.
The number of key-value pairs currently stored in the cache.
Clears all data from the cache store and resets the size counter to zero. This operation removes all key-value pairs from the internal Map storage.
Deletes an entry from the cache by its key.
The key of the cache entry to delete
True if an element was removed successfully, false if the key was not found
Checks if a value exists for the specified key in the cache
The key to check in the cache
True if the key exists in the cache, false otherwise
A memory-based cache store implementation using LRU (Least Recently Used) cache strategy.
Remarks
This cache store implementation provides the following features:
Example