Configuration related to the behaviour of the scalacache.memoization.memoize() methods.
Configuration related to the behaviour of the scalacache.memoization.memoize() methods.
converter for generating a String cache key from information about a method call
Converts information about a method call to a String for use in a cache key
Add this annotation to method or class constructor parameters in order to exclude them from auto-generated cache keys.
Add this annotation to method or class constructor parameters in order to exclude them from auto-generated cache keys.
e.g.
def foo(a: Int, @cacheKeyExclude b: String, c: String): Int = memoize { ... }
will not include the value of the b
parameter in its cache keys.
Perform the given operation and memoize its result to a cache before returning it.
Perform the given operation and memoize its result to a cache before returning it. If the result is already in the cache, return it without performing the operation.
The result is stored in the cache with the given TTL. It will be evicted when the TTL is up.
Note that if the result is currently in the cache, changing the TTL has no effect. TTL is only set once, when the result is added to the cache.
type of the value to be cached
Time To Live. How long the result should be stored in the cache.
function that returns some result. This result is the valued that will be cached.
cache configuration
flags to customize ScalaCache behaviour
the result, either retrieved from the cache or calculated by executing the function f
Perform the given operation and memoize its result to a cache before returning it.
Perform the given operation and memoize its result to a cache before returning it. If the result is already in the cache, return it without performing the operation.
The result is stored in the cache without a TTL, so it will remain until it is naturally evicted.
type of the value to be cached
function that returns some result. This result is the valued that will be cached.
cache configuration
flags to customize ScalaCache behaviour
the result, either retrieved from the cache or calculated by executing the function f
Utilities for memoizing the results of method calls in a cache. The cache key is generated from the method arguments using a macro, so that you don't have to bother passing them manually.