Update httpcache.py

It checks cache directory modification time, but have to check file modification time.
This commit is contained in:
nanolab 2016-03-23 11:37:01 +02:00 committed by Paul Tremberth
parent 7082454f2a
commit a583e4d531
1 changed files with 1 additions and 1 deletions

View File

@ -328,7 +328,7 @@ class FilesystemCacheStorage(object):
metapath = os.path.join(rpath, 'pickled_meta')
if not os.path.exists(metapath):
return # not found
mtime = os.stat(rpath).st_mtime
mtime = os.stat(metapath).st_mtime
if 0 < self.expiration_secs < time() - mtime:
return # expired
with self._open(metapath, 'rb') as f: