Matt,

I understand the purpose of the cache - it is certainly a good idea to not
have to hit the database all the time. But actually, there is a userCache
instance injected into the UserManager. It is used in removeUser and
saveUser. I'd prefer to move the code from UserSecurityAdvice into
UserManagerImpl and have it all in one place so that we can remove the
UserSecurityAdvice completely from the code base. We are handling the
security checks that UserSecurityAdvice.before() is doing in other ways now
- specifically through the security.xml and in our application it is OK for
a user to upgrade to admin role - we are allowing this through groups since
a group can have admin privileges.

Thanks,

Tony


mraible wrote:
> 
> The userCache is not injected into UserManager, only
> UserSecurityAdvice.  It's also used by Acegi and basically maintains a
> cache of the users.  UserSecurityAdvice uses it to expire cache items
> when a user is updated.  Now that we use our own Dao (instead of
> Acegi's), it may be possible to remove this and rely on Hibernate's
> 2nd level cache.
> 
> At the very least, this cache prevents Acegi from hitting the database
> for every request when the user information is not stored in the
> session (which is an option).
> 
> Matt
> 
> On 3/1/07, tonyl <[EMAIL PROTECTED]> wrote:
>>
>> I haven't been able to find any clear explanations of the userCache -
>> what it
>> is, why use it, etc. And I really don't understand the purpose of having
>> a
>> userCache in 2 places.
>>
>> What's going on?
>>
>> Thanks,
>>
>> Tony
>> --
>> View this message in context:
>> http://www.nabble.com/Why-is-userCache-in-userManager-and-UserSecurityAdvice--tf3327560s2369.html#a9251684
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> http://raibledesigns.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Why-is-userCache-in-userManager-and-UserSecurityAdvice--tf3327560s2369.html#a9272040
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to