Currently I use the basic mset
feature to store a key/value;
from common.redis_client import get_redis_client
cache = get_redis_client()
for k,v in some_dict.items():
kw = {'key': value}
cache.mset(kw)
#later:
cache.get('key')
I store each key/value separatly (not in one json for example) Since storing the whole dict would turn it into a string and would require me to serialize/deserialize on storing and retrieving and I really need access to seperate key/values.
My question:: is there a way I can mset
multiple key/values at once? Instead of multiple writes to the redis db? And vice-versa can I have multiple reads (get) in one access? (and Yes - I have a lot of redis activity going on and with heavy load. I do care about this)