Ticket #714 (defect)
Opened 1 year ago
Last modified 1 year ago
bug in tools.caching
Status: closed (fixed)
| Reported by: | andcycle@andcycle.idv.tw | Assigned to: | rdelon |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | CherryPy code | Keywords: | |
| Cc: |
I have viewed the source around cherrypy/lib/caching.py
"""
If POST, PUT, or DELETE:
* invalidates (deletes) any cached response for this resource
* sets request.cached = False
* sets request.cacheable = False
"""
(blablabla
"""
# POST, PUT, DELETE should invalidate (delete) the cached copy.
# See http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.10.
if request.method in invalid_methods:
cherrypy._cache.delete()
request.cached = False
request.cacheable = False
return False
"""
the default class MemoryCache? delete method doesn't handle the possibility that obj doesn't exist, it will raise exceptions.KeyError?, this should be easy to fix
class MemoryCache:
...
def delete(self):
self.cache.pop(self.key, None)
Change History
08/22/07 00:55:00: Modified by fumanchu
- status changed from new to closed.
- resolution set to fixed.
10/28/07 13:38:03: Modified by fumanchu
Trunk fixed in [1798].


3.0.x fixed in [1705].