class IdempotentStorageIterface(object):
def get(self, key): pass
def set(self, key): pass
def atomic_set(self, key): pass
def subscribe(self, key): pass
def get_messages(self, timeout=None): pass
def notify(self, key, message): pass
def close(self): pass
atomic_set can be implemented in redis using NX {E,P}X
close should cleanly end any subscriptions, and close any sockets or connections that were created for this request. Pooling should be preferred over connect/close, and close should release the connection to the pool in that case. Redis uses StrictRedis.from_url which is a ConnectionPool instance.
atomic_set can be implemented in redis using NX {E,P}X
close should cleanly end any subscriptions, and close any sockets or connections that were created for this request. Pooling should be preferred over connect/close, and close should release the connection to the pool in that case. Redis uses StrictRedis.from_url which is a ConnectionPool instance.