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:
parent
dab45a2555
commit
fc3230e5b5
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ INVALID = object()
|
||||||
|
|
||||||
def caching(self, method, id):
|
def caching(self, method, id):
|
||||||
annot = self.request.annotations
|
annot = self.request.annotations
|
||||||
item = annot.setdefault('cybertools.util.rcache', {})
|
item = annot.setdefault('cybertools.zutil.rcache', {})
|
||||||
value = item.get(id, INVALID)
|
value = item.get(id, INVALID)
|
||||||
if value is INVALID:
|
if value is INVALID:
|
||||||
value = method()
|
value = method()
|
||||||
|
|
Loading…
Add table
Reference in a new issue