i need some help with a plone.memoize caching.
I try to cache a method on a browser view only if
the result of the methods aktive == '1'.
This is my implementation:
def _render_details_cachekey(method, self):
keys = self.veryExpensiveOftenCalledMethod()
if keys.get('aktiv') == '1':
return (keys.get('user',), keys.get('aktiv'))
else:
DontCache
Does this work?
Do you see any problems with it?
Thanks for your help.
Christian
I'm sure this won't work. Your expensive method is part of the
computation of the cache key which means it will be called every single
time rendering your caching useless.
H
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers