mirror of https://github.com/scrapy/scrapy.git
Merge pull request #1875 from nanolab/patch-1
[MRG+1] FS cache storage misuses mtime for expiration
This commit is contained in:
commit
26642388c3
|
|
@ -281,7 +281,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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue