Scrapy, a fast high-level web crawling & scraping framework for Python.
added INFO message
samus_9c345016b8a7
diff --git a/scrapy/trunk/scrapy/contrib/downloadermiddleware/cache.py b/scrapy/trunk/scrapy/contrib/downloadermiddleware/cache.pyindex 66f8a99ae..4b56ebe37 100644--- a/scrapy/trunk/scrapy/contrib/downloadermiddleware/cache.py+++ b/scrapy/trunk/scrapy/contrib/downloadermiddleware/cache.py@@ -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 Falseelse:return False