Global redis
T = TypeVar('T')
module-attribute
r = None
module-attribute
get_redis()
get_with_timeout(key, timeout, allow_none=False, default=_NOT_SET)
async
Get a key with timeout.
| PARAMETER | DESCRIPTION |
|---|---|
key
|
redis key
TYPE:
|
timeout
|
timeout in seconds
TYPE:
|
allow_none
|
if True, return None if key is not found
TYPE:
|
default
|
default value to return if key is not found.
TYPE:
|
Returns: value of key
initialize_redis(url)
listen_with_timeout(pubsub, timeout)
async
set_with_expiry(key, value, expiry)
async
Set a key with expiry in seconds.
| PARAMETER | DESCRIPTION |
|---|---|
key
|
redis key
TYPE:
|
value
|
value to store
TYPE:
|
expiry
|
timeout in seconds.
TYPE:
|