[Product-Developers] Cache in an Browser View.
Christian Klinger
cklinger at novareto.de
Wed Sep 3 12:54:08 UTC 2008
Hi,
i try to cache a method in a BrowserView.
The result of the view is a list of dicts.
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:
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module nva.companyinfo.browser, line 57, in __call__
Module zope.formlib.form, line 769, in __call__
Module Products.Five.formlib.formbase, line 46, in update
Module zope.formlib.form, line 750, in update
Module zope.formlib.form, line 594, in success
Module nva.companyinfo.browser, line 100, in action_resutls
Module plone.memoize.instance, line 43, in memogetter
TypeError: dict objects are unhashable
What is the best way to cache this method.
Christian
More information about the Product-Developers
mailing list