A HashMap would work fine unless you care to add/remove people or
permissions without restarting your app server.  If changing the security
information is important to you, then you'll either need some method to
expire old data or make sure that whatever you do to change the security
information also changes the cache.

I'm currently caching my group information using an object that extends
HashMap but also does time-based and size-based expiration.  So I have a 5
minute cache. 

-----Original Message-----
From: Christian, Joanne
To: Orion-Interest
Sent: 3/6/2002 12:00 PM
Subject: Caching Group Information

Hi All,

I am using a custom user manager that gets group and user information
from
the database.  I would like to cache the database information when the
user
manager is initialized; and access the cache to get the user
information.

Can anyone suggest the best method for doing this?  I am thinking about
using a hashmap, but I'm not quite sure what is the best option.


Thanks,

Joanne

Reply via email to