2.5 backport #40720 - fix cache timeout behavior (#41018)

* Fix cache timeout behavior

(cherry picked from commit c1400ce909)

* changelog
This commit is contained in:
Sloane Hertel 2018-06-07 20:01:50 -04:00 committed by Matt Davis
parent 515a625e13
commit 43cfb89c2a
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- A cache timeout of 0 means the cache will not expire.

View file

@ -153,7 +153,7 @@ class BaseFileCacheModule(BaseCacheModule):
def has_expired(self, key):
if self._timeout == 0:
return True
return False
cachefile = "%s/%s" % (self._cache_dir, key)
try: