add utility for caching values in the request

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3793 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2010-03-30 13:35:42 +00:00
parent dab45a2555
commit fc3230e5b5

View file

@ -28,7 +28,7 @@ INVALID = object()
def caching(self, method, id):
annot = self.request.annotations
item = annot.setdefault('cybertools.util.rcache', {})
item = annot.setdefault('cybertools.zutil.rcache', {})
value = item.get(id, INVALID)
if value is INVALID:
value = method()