settings: added scan helper function.

parent ad2e6a56
......@@ -97,6 +97,18 @@ def write_decorator(func):
return func(self,value,**keys)
return _write
def scan(match='*',count=1000,connection=None):
if connection is None:
connection = get_cache()
cursor = 0
while 1:
cursor,values = connection.scan(cursor=cursor,
for val in values:
yield val
if int(cursor) == 0:
class SimpleSetting(object):
def __init__(self,name,connection = None,
read_type_conversion = auto_conversion,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment