mirror of https://github.com/scrapy/scrapy.git
Update httpcache.py
It checks cache directory modification time, but have to check file modification time.
This commit is contained in:
parent
7082454f2a
commit
a583e4d531
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue