added INFO message

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%4081
This commit is contained in:
samus_ 2008-07-21 14:07:57 +00:00
parent d2121141a3
commit 9c345016b8
1 changed files with 5 additions and 1 deletions

View File

@ -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