Commit 66ed3973 by James Cammarata

Fix redis fact_caching_timeout=0 bug

Fixes #12018
parent 5a5b9f21
...@@ -75,7 +75,7 @@ class CacheModule(BaseCacheModule): ...@@ -75,7 +75,7 @@ class CacheModule(BaseCacheModule):
def _expire_keys(self): def _expire_keys(self):
if self._timeout > 0: if self._timeout > 0:
expiry_age = time.time() - self._timeout expiry_age = time.time() - self._timeout
self._cache.zremrangebyscore(self._keys_set, 0, expiry_age) self._cache.zremrangebyscore(self._keys_set, 0, expiry_age)
def keys(self): def keys(self):
self._expire_keys() self._expire_keys()
......
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