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

use SCAN instead of KEYS

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