Commit 379b7143 authored by Sean Bleier's avatar Sean Bleier

Use scan_iter to delete keys instead scan.

parent 8aea67c0
......@@ -393,8 +393,8 @@ class BaseRedisCache(BaseCache):
return 0
def _delete_pattern(self, client, pattern):
cursor, keys = client.scan(match=pattern)
while cursor:
keys = list(client.scan_iter(match=pattern))
if keys:
client.delete(*keys)
def delete_pattern(self, pattern, version=None):
......
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