--- a/web/httpcache.py Mon Feb 01 18:55:47 2010 +0100
+++ b/web/httpcache.py Tue Feb 02 10:47:47 2010 +0100
@@ -111,14 +111,10 @@
mtime = self.req.header_if_modified_since()
if mtime:
tdelta = (ctime - mtime)
- if tdelta.days * 24*60*60 + tdelta.seconds > self.cache_max_age:
- mtime = ctime
- else:
- mtime = ctime
- else:
- mtime = ctime
+ if tdelta.days * 24*60*60 + tdelta.seconds <= self.cache_max_age:
+ return mtime
# mtime = ctime will force page rerendering
- return mtime
+ return ctime
viewmod.View.last_modified = last_modified
# configure default caching