* Fix cache timeout behavior
(cherry picked from commit c1400ce909
)
* changelog
This commit is contained in:
parent
515a625e13
commit
43cfb89c2a
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/fix_cache_timeout_0.yaml
Normal file
2
changelogs/fragments/fix_cache_timeout_0.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- A cache timeout of 0 means the cache will not expire.
|
2
lib/ansible/plugins/cache/__init__.py
vendored
2
lib/ansible/plugins/cache/__init__.py
vendored
|
@ -153,7 +153,7 @@ class BaseFileCacheModule(BaseCacheModule):
|
||||||
def has_expired(self, key):
|
def has_expired(self, key):
|
||||||
|
|
||||||
if self._timeout == 0:
|
if self._timeout == 0:
|
||||||
return True
|
return False
|
||||||
|
|
||||||
cachefile = "%s/%s" % (self._cache_dir, key)
|
cachefile = "%s/%s" % (self._cache_dir, key)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue