summaryrefslogtreecommitdiff
path: root/cherrypy/lib/caching.py
diff options
context:
space:
mode:
authorRobert Brewer <fumanchu@aminus.org>2009-06-24 05:16:43 +0000
committerRobert Brewer <fumanchu@aminus.org>2009-06-24 05:16:43 +0000
commit6c68f4bab01ab90cfe59d888405ec1dd4b459bcc (patch)
tree8a1cc7548a5b35c1e848d4611c857fc335173e9d /cherrypy/lib/caching.py
parent60831030792b4f018c627a06b2ef1b8fdad68644 (diff)
downloadcherrypy-git-6c68f4bab01ab90cfe59d888405ec1dd4b459bcc.tar.gz
Some cross ports from the python3 branch, including two test fixes.
Diffstat (limited to 'cherrypy/lib/caching.py')
-rw-r--r--cherrypy/lib/caching.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cherrypy/lib/caching.py b/cherrypy/lib/caching.py
index e97decb6..cebf5399 100644
--- a/cherrypy/lib/caching.py
+++ b/cherrypy/lib/caching.py
@@ -137,6 +137,8 @@ class MemoryCache:
# See tickets #99 and #180 for more information.
while time:
now = time.time()
+ # Must make a copy of expirations so it doesn't change size
+ # during iteration
for expiration_time, objects in self.expirations.items():
if expiration_time <= now:
for obj_size, obj_key in objects: