mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[wip] Let jsonfile and memcached cache plugins understand fact_caching_timeout=0 (#17565)
* Add support for no-expiration to jsonfile cache * Let memcached cache use fact_caching_timeout=0 If fact_cache=memcached and fact_caching_timeout=0 memcached would hit a NameError on _expire_keys
This commit is contained in:
parent
9785e064c1
commit
c633022fca
2 changed files with 4 additions and 1 deletions
3
lib/ansible/plugins/cache/jsonfile.py
vendored
3
lib/ansible/plugins/cache/jsonfile.py
vendored
|
@ -108,6 +108,9 @@ class CacheModule(BaseCacheModule):
|
|||
|
||||
def has_expired(self, key):
|
||||
|
||||
if self._timeout == 0:
|
||||
return False
|
||||
|
||||
cachefile = "%s/%s" % (self._cache_dir, key)
|
||||
try:
|
||||
st = os.stat(cachefile)
|
||||
|
|
Loading…
Reference in a new issue