Re: Problem with borg.localroles cache
thomas desvenain <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <CAFn5D-gqaDexwYCXbAdJ04xxnG8k96XQzBXuRyq74-znTKmHzg@mail.gmail.com> |
So, should we set HTTPRequest IAttributeAnnotatable anywhere ? In which package ? Thomas On Mon, Aug 12, 2013 at 3:42 PM, thomas desvenain < [email protected]> wrote: > Hi > > borg.localroles uses annotations on requests to cache roles > > > https://github.com/plone/borg.localrole/blob/master/borg/localrole/workspace.py > > The problem is that on my Plone 4.3 site, request is not > IAttributeAnnotatable. > > if IAnnotations(request, None) is None: > raise DontCache > > I think it is an issue as the method comments says : > > " > > So let's add one and try again. Before we also need to mark it as > being annotatable, which normally happens elsewhere: > > " > > > On this project I manually added the interface : > > from zope.annotation.interfaces import IAttributeAnnotatable > classImplements(HTTPRequest, IAttributeAnnotatable) > > it makes me earn 30% time ! > > -- > Thomas Desvenain > > Téléphone : 09 51 37 35 18 > -- Thomas Desvenain Téléphone : 09 51 37 35 18 ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Plone-developers mailing list Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/plone-developers