Commits

Robert Brewer  committed e1c8381

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

  • Participants
  • Parent commits 4e078bb
  • Branches cherrypy-2.x

Comments (0)

Files changed (1)

File 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)