diff options
Diffstat (limited to 'cherrypy')
| -rw-r--r-- | cherrypy/__init__.py | 2 | ||||
| -rw-r--r-- | cherrypy/lib/filter/cachefilter.py | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/cherrypy/__init__.py b/cherrypy/__init__.py index afced147..3c0bd3ef 100644 --- a/cherrypy/__init__.py +++ b/cherrypy/__init__.py @@ -1 +1 @@ -__version__ = '2.0.0' +__version__ = '2.1.0 alpha' diff --git a/cherrypy/lib/filter/cachefilter.py b/cherrypy/lib/filter/cachefilter.py index 9c19b193..9ff30bdd 100644 --- a/cherrypy/lib/filter/cachefilter.py +++ b/cherrypy/lib/filter/cachefilter.py @@ -58,8 +58,12 @@ class MemoryCache: def expireCache(self): while True: - expirationTime, objSize, objKey = self.expirationQueue.get(block=True, timeout=None) - while (time.time() < expirationTime): + expirationTime, objSize, objKey = self.expirationQueue.get(block=True, timeout=None)
+ # expireCache runs in a separate thread which the servers are
+ # not aware of. It's possible that "time" will be set to None
+ # arbitrarily, so we check "while time" to avoid exceptions.
+ # See tickets #99 and #180 for more information.
+ while time and (time.time() < expirationTime): time.sleep(0.1) try: del self.cache[objKey] |
