rich akka actor providing additional functionality and syntax sugar
rich akka actor providing additional functionality and syntax sugar
enriches any ref by toFuture converting a value to Future.successful
enriches any ref by toFuture converting a value to Future.successful
waits for future responses and returns them synchronously
waits for future responses and returns them synchronously
current application
current application
Transforms the promise into desired builder results
Transforms the promise into desired builder results
configuration of the connection
configuration of the connection
default invocation context of all cache commands
default invocation context of all cache commands
redis database to work with
redis database to work with
decode given value and handle error if occurred
decode given value and handle error if occurred
encode given value and handle error if occurred
encode given value and handle error if occurred
Determines whether value exists in cache.
Determines whether value exists in cache.
cache storage key
record existence, true if exists, otherwise false
refreshes expiration time on a given key, useful, e.g., when we want to refresh session duration
refreshes expiration time on a given key, useful, e.g., when we want to refresh session duration
cache storage key
new expiration in seconds
promise
Retrieve a value from the cache.
Retrieve a value from the cache.
cache storage key
stored record, Some if exists, otherwise None
Retrieve a value from the cache.
Retrieve a value from the cache. If is missing, set default value with given expiration and return the value.
cache storage key
expiration period in seconds.
The default function to invoke if the value was not found in cache.
stored or default record, Some if exists, otherwise None
Retrieve a value from the cache.
Retrieve a value from the cache. If is missing, set default value with given expiration and return the value.
cache storage key
expiration period in seconds.
The default function to invoke if the value was not found in cache.
stored or default record, Some if exists, otherwise None
host with redis server
host with redis server
Remove all keys in cache
default invocation context of all cache commands
default invocation context of all cache commands
logger instance
logger instance
Retrieves all keys matching the given pattern.
Retrieves all keys matching the given pattern. This method invokes KEYS command
Warning: complexity is O(n) where n are all keys in the database
valid KEYS pattern with wildcards
list of matching keys
password for authentication with redis
password for authentication with redis
port redis listens on
port redis listens on
communication module to Redis cache
communication module to Redis cache
Remove all values from the cache
Remove all values from the cache
cache storage key
cache storage key
cache storage keys
promise
Remove a value under the given key from the cache
Remove a value under the given key from the cache
cache storage key
promise
Removes all keys in arguments.
Removes all keys in arguments. The other remove methods are for syntax sugar
cache storage keys
promise
Removes all keys matching the given pattern.
Removes all keys matching the given pattern. This command has no direct support in Redis, it is combination of KEYS and DEL commands.
KEYS pattern
command finds all keys matching the given patternDEL keys
expires all of themThis is usable in scenarios when multiple keys contains same part of the key, such as
record identification, user identification, etc. For example, we may have keys such
as 'page/$id/header', 'page/$id/body', 'page/$id/footer' and we want to remove them
all when the page is changed. We use the benefit of the naming convention we use and
execute removeAllMatching( s"page/$id/*" )
, which invalidates everything related to
the given page. The benefit is we do not need to maintain the list of all keys to invalidate,
we invalidate them all at once.
Warning: complexity is O(n) where n are all keys in the database
this must be valid KEYS pattern
nothing
Set a value into the cache.
Set a value into the cache. Expiration time in seconds (0 second means eternity).
cache storage key
value to store
record duration in seconds
promise
stops running brando actor
timeout of cache requests
timeout of cache requests
Implementation of plain API using redis-server cache and Brando connector implementation.