Skip to content

msaStorageDict Module

.redis


Classes

MSARedisDict

Bases: MSAConnectionStorageDict

Dictionary-style access to a redis hash table. Populates a cache and a local in-memory to avoid multiple hits to the database.

Functions just like you'd expect it::

mydict = MSARedisDict('my_redis_key', Redis())
mydict['test']
# 'bar' #doctest: +SKIP

Functions

__init__
__init__(*args, **kwargs)
__last_update_key property
__last_update_key()
__touch_and_multi
__touch_and_multi(*args, **kwargs)

Runs each tuple of (redis_cmd, args) provided inside of a Redis MULTI block, plus an increment of the last_updated value, then executes the MULTI block. If returns is specified, it returns that index from the results list. If returns is None, returns all values.

__touch_last_updated
__touch_last_updated()
depersist
depersist(key)
durables
durables()
last_updated
last_updated()
persist
persist(key, value)

Last update: September 24, 2022
Created: September 24, 2022