Commits

Robert Brewer committed e1c8381

2.x backport of [1443] (use response.time for cache expiration).

Comments (0)

Files changed (1)

cherrypy/filters/cachefilter.py

             (len(self.cache) < self.maxobjects)):
             # add to the expirationQueue & cache
             try:
-                expirationTime = time.time() + cherrypy.config.get("cache_filter.delay", 600)
+                expirationTime = cherrypy.response.time + cherrypy.config.get("cache_filter.delay", 600)
                 objKey = self.key
                 self.expirationQueue.put((expirationTime, objSize, objKey))
                 self.cache[objKey] = (expirationTime, lastModified, obj)