[Product-Developers] Re: Cache in an Browser View.

Daniel Nouri daniel.nouri at gmail.com
Wed Sep 3 13:03:36 UTC 2008


Christian Klinger writes:

> i try to cache a method in a BrowserView.
> The result of the view is a list of dicts.

Cache how?  Per request?

> I try to use plone.memoize for this topic.
>
>     @instance.memoize
>     def worker(self, data):
>         print "WORKING ...."
>         ...
>         return [{},{}]
>
> If i access this view i got these error:

Take a look at 'plone.memoize.request.cache' or
'plone.memoize.ram.cache' depending on your needs.  They're much more
powerful decorators than instance.memoize and friends.


-- 
http://danielnouri.org





More information about the Product-Developers mailing list