Skip to content

Commit a583e4d

Browse files
nanolabredapple
authored andcommitted
Update httpcache.py
It checks cache directory modification time, but have to check file modification time.
1 parent 7082454 commit a583e4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scrapy/extensions/httpcache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def _read_meta(self, spider, request):
328328
metapath = os.path.join(rpath, 'pickled_meta')
329329
if not os.path.exists(metapath):
330330
return # not found
331-
mtime = os.stat(rpath).st_mtime
331+
mtime = os.stat(metapath).st_mtime
332332
if 0 < self.expiration_secs < time() - mtime:
333333
return # expired
334334
with self._open(metapath, 'rb') as f:

0 commit comments

Comments
 (0)