mirror of https://github.com/scrapy/scrapy.git
added INFO message
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%4081
This commit is contained in:
parent
d2121141a3
commit
9c345016b8
|
|
@ -114,7 +114,11 @@ class Cache(object):
|
|||
if os.path.exists(requestpath):
|
||||
with open(os.path.join(requestpath, 'meta_data')) as f:
|
||||
metadata = eval(f.read())
|
||||
return datetime.datetime.now() <= metadata['timestamp'] + datetime.timedelta(seconds=settings.getint('CACHE2_EXPIRATION_SECS'))
|
||||
if datetime.datetime.now() <= metadata['timestamp'] + datetime.timedelta(seconds=settings.getint('CACHE2_EXPIRATION_SECS')):
|
||||
return True
|
||||
else:
|
||||
log.msg('dropping old cached response from %s' % metadata['timestamp'], log.INFO)
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue