From a583e4d531306b7628b42f8a32c7db892ad86cf1 Mon Sep 17 00:00:00 2001 From: nanolab Date: Wed, 23 Mar 2016 11:37:01 +0200 Subject: [PATCH] Update httpcache.py It checks cache directory modification time, but have to check file modification time. --- scrapy/extensions/httpcache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/extensions/httpcache.py b/scrapy/extensions/httpcache.py index a871cc895..247cac64e 100644 --- a/scrapy/extensions/httpcache.py +++ b/scrapy/extensions/httpcache.py @@ -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: