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


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to