Get a value from the cache if it exists.
Get a value from the cache if it exists. Otherwise compute it, insert it into the cache, and return it.
The type of container in which the result will be wrapped. This is decided by the mode.
The cache key
The time-to-live to use when inserting into the cache. The cache entry will expire after this time has elapsed.
A block that computes the value
The operation mode, which decides the type of container in which to wrap the result
Flags used to conditionally alter the behaviour of ScalaCache
The value, either retrieved from the cache or computed
Get a value from the cache if it exists.
Get a value from the cache if it exists. Otherwise compute it, insert it into the cache, and return it.
The type of container in which the result will be wrapped. This is decided by the mode.
The cache key
The time-to-live to use when inserting into the cache. The cache entry will expire after this time has elapsed.
A block that computes the value wrapped in a container
The operation mode, which decides the type of container in which to wrap the result
Flags used to conditionally alter the behaviour of ScalaCache
The value, either retrieved from the cache or computed
You should call this when you have finished using this Cache.
You should call this when you have finished using this Cache. (e.g. when your application shuts down)
It will take care of gracefully shutting down the underlying cache client.
Note that you should not try to use this Cache instance after you have called this method.
The type of container in which the result will be wrapped. This is decided by the mode.
The operation mode, which decides the type of container in which to wrap the result
Get a value from the cache
Get a value from the cache
The type of container in which the result will be wrapped. This is decided by the mode.
The cache key
The operation mode, which decides the type of container in which to wrap the result
Flags used to conditionally alter the behaviour of ScalaCache
The appropriate value, if it was found in the cache
Insert a value into the cache, optionally setting a TTL (time-to-live)
Insert a value into the cache, optionally setting a TTL (time-to-live)
The type of container in which the result will be wrapped. This is decided by the mode.
The cache key
The value to insert
The time-to-live. The cache entry will expire after this time has elapsed.
The operation mode, which decides the type of container in which to wrap the result
Flags used to conditionally alter the behaviour of ScalaCache
Remove the given key and its associated value from the cache, if it exists.
Remove the given key and its associated value from the cache, if it exists. If the key is not in the cache, do nothing.
The type of container in which the result will be wrapped. This is decided by the mode.
data to be used to generate the cache key. This could be as simple as just a single String. See CacheKeyBuilder.
Delete the entire contents of the cache.
Delete the entire contents of the cache. Use wisely!
The type of container in which the result will be wrapped. This is decided by the mode.