Commit 4b1fa706 authored by Justin Arulnathan's avatar Justin Arulnathan

use SCAN instead of KEYS

parent a073a3ee
......@@ -392,8 +392,8 @@ class BaseRedisCache(BaseCache):
return 0
def _delete_pattern(self, client, pattern):
keys = client.keys(pattern)
if len(keys):
cursor, keys = client.scan(match=pattern)
while cursor:
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