InMemoryCacheImpl
The in memory cache that delegates to HashMap
This class is not thread safe.
Value parameters
- maxMemSize
-
The max size of memory (MBytes) that can be used by the object in memory
- maxSize
-
The max number of items to keep in memory
Attributes
- Graph
-
- Supertypes
Members list
Type members
Classlikes
The objects stored in cache with:
The objects stored in cache with:
- The memory used to store the object
- Timestamp of last update
- The JSON string representing the object
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
Empty the cache
Remove an object from the cache
Remove an object from the cache
Value parameters
- key
-
The key of the object to remove
Attributes
- Returns
-
True if the object has been removed, False otherwise (for example the object was not in the cache)
- Definition Classes
Get an object from the cache
Get an object from the cache
Value parameters
- key
-
The unique key to identify the object
Attributes
- Returns
-
The Object in the cache if it exists, empty otherwise
- Definition Classes
Collects all keys of this map in a set
Puts/update a value in the cache
Puts/update a value in the cache
Value parameters
- key
-
The unique key to identify the object
- value
-
: The string to store in the cache
Attributes
- Returns
-
true if the object has been stored in the cache, false otherwise
- Definition Classes
Attributes
- Returns
-
the number of objects in this cache (both in memory and persisted)
Concrete fields
The size in memory of the objects stored in cache
The size in memory of the objects stored in cache