Re: versions of jars?

"Max Cooper" <[email protected]> Mon, 7 Apr 2003 16:31:16 -0700
Newsgroups gmane.comp.java.securityfilter.user
Message-ID <003e01c2fd5d$ca2f0460$8602010a@ozzy>
Daniel,

You are correct, there is currently no caching. The non-generic predecessor
to SecurityFilter that I wrote for a project uses a cache that expires the
list of roles for a user whenever authenticate() is called for that user.
This works okay for a site with a small number of users, but we probably
need something more advanced for general application so that it doesn't
become a memory hog.

Caching has long been a high priority item in my head, but I just added an
RFE for it so that we won't forget. Here's a link to the RFE if you would
like to add any thoughts or suggestions on the topic:
http://sourceforge.net/tracker/index.php?func=detail&aid=717115&group_id=594
84&atid=491167

-Max

----- Original Message -----
From: "Daniel Kehoe" <kehoe-u2F8/sPSwBdWk0Htik3J/[email protected]>
To: "Max Cooper" <[email protected]>;
<securityfilter-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Sent: Monday, April 07, 2003 12:04 PM
Subject: Re: [securityfilter-user] versions of jars?


> I've got an implementation of TrivialSecurityRealm. The method
> booleanAuthenticate(String username, String password) seems to get called
> only once, on a login attempt, which is expected behaviour. But the
> method isUserInRole(String username, String role) is called every time
> there's code in my JSP page that checks the role, for example:
> <% if (request.isUserInRole("user")) { %>
>
> My SecurityRealm.isUserInRole(...) checks against a database, so there's
> a hit on the database every time. I would expect there to be some caching
> of the role in the SecurityFiilter (there seems to be for the user id) to
> minimize need for lookups. I haven't looked at the source (apologies);
> just wanted to ask first.
> --
>   Daniel
>   kehoe-u2F8/sPSwBdWk0Htik3J/[email protected]
>



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/