mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix flush_cache on redis cache
Fix a del on non existent self.cache. Fixes #31148
This commit is contained in:
parent
278ff19bea
commit
dae0ad1ce6
1 changed files with 1 additions and 1 deletions
2
lib/ansible/plugins/cache/redis.py
vendored
2
lib/ansible/plugins/cache/redis.py
vendored
|
@ -116,7 +116,7 @@ class CacheModule(BaseCacheModule):
|
||||||
return (self._db.zrank(self._keys_set, key) is not None)
|
return (self._db.zrank(self._keys_set, key) is not None)
|
||||||
|
|
||||||
def delete(self, key):
|
def delete(self, key):
|
||||||
del self.cache[key]
|
del self._cache[key]
|
||||||
self._db.delete(self._make_key(key))
|
self._db.delete(self._make_key(key))
|
||||||
self._db.zrem(self._keys_set, key)
|
self._db.zrem(self._keys_set, key)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue