diff --git a/zutil/rcache.py b/zutil/rcache.py index d357da2..f48bf15 100644 --- a/zutil/rcache.py +++ b/zutil/rcache.py @@ -31,7 +31,7 @@ def caching(self, method, id): item = annot.setdefault('cybertools.zutil.rcache', {}) value = item.get(id, INVALID) if value is INVALID: - value = method() + value = method(self) item[id] = value return value diff --git a/zutil/rcache.txt b/zutil/rcache.txt index bcc7353..fdba6e5 100644 --- a/zutil/rcache.txt +++ b/zutil/rcache.txt @@ -12,12 +12,12 @@ $Id$ ... self.request = request ... ... @rcache - ... def calculate(): + ... def calculate(self): ... print 'calculating' ... return 42 ... ... @rcacheproperty - ... def value(): + ... def value(self): ... print 'calculating' ... return 43