Redis client with inmemory fallback.
If connection to Redis is not found or fails, storage fallbacks to inmemory KV store.
Creates a new client. Connection timeout is
CacheMem#get(key, defaultValue=undefined) -> Promise
Gets the value for
key. If no value is found,
defaultValue is returned instead.
CacheMem#set(key, value) -> Promise
Set a new
key. The setted value is returned.
CacheMem#increment(key) -> Promise
Increments the value at
key by 1.
CacheMem#expire(key, expiration) -> Promise
key in the indicated
expiration seconds. Promise resolves to
CacheMem#ttl(key) -> Promise
Gets the remaining seconds for the
key to expire. Promise might resolve to
if the key is not set or
-1 if no expiration has been set to the
CacheMem#keys(query) -> Promise
Gets all keys that match the given