I don't say not to cache it. But we could cache it after first invocation. Just add a map<component,boolean> as request cycle metadata. Would be lot cleaner and would save us one ugly traversal.
-Matej On 9/16/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > the value is cached per request not per session > > also since the security policy is more global then the request it is harder > for it to cache on that level because it is a more granular level. you would > need something like a threadlocal with a map:component->boolean, and since > strategy is not aware of request lifecycle it would be hard for it to clean > the threadlocal. > > -igor > > > On 9/16/07, Maurice Marrink <[EMAIL PROTECTED]> wrote: > > > > Should it not be the responsibility of the security layer to cache > > that value if it is indeed such an expensive lookup? > > > > This same logic / problem would apply to all security inquiries wicket > > makes. > > > > Also it is not unthinkable that this value changes during a user > > session, just think of the su command in linux. wicket caching this > > value would complicate matters in those situations. the security layer > > oth will probably know / support this kind of changes to the > > authorization of a person and will be able to keep its internal > > bookkeeping / caching up to date. > > > > just my 2 cents. > > > > Maurice > > > > On 9/16/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > wasnt the idea to do a pass one time and cache the value for the > > request? > > > because the lookup might be expensive. > > > > > > i wish we did that with isvisible, etc too :) > > > > > > -igor > > > > > > > > > On 9/16/07, Matej Knopp <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi, > > > > > > > > is there a good reason why we traverse entire hierarchy and call > > > > setRenderAllowed on every component, when we could just change > > > > isRenderAllowed() to ask authorization strategy? > > > > > > > > -Matej > > > > > > > > > >
