Fix flush_cache on redis cache

Fix a del on non existent self.cache.

Fixes #31148
This commit is contained in:
Adrian Likins 2017-10-02 13:53:39 -04:00 committed by Brian Coca
parent 278ff19bea
commit dae0ad1ce6

View file

@ -116,7 +116,7 @@ class CacheModule(BaseCacheModule):
return (self._db.zrank(self._keys_set, key) is not None)
def delete(self, key):
del self.cache[key]
del self._cache[key]
self._db.delete(self._make_key(key))
self._db.zrem(self._keys_set, key)