com.atlassian.user.impl.cache
Class GroupsForUserCache
java.lang.Object
com.atlassian.user.impl.cache.GroupsForUserCache
public class GroupsForUserCache
- extends Object
The groups-for-user cache is a cache where the key is the username as a
String and the value is a List of group names as
Strings.
- See Also:
CachingGroupManager
|
Method Summary |
List |
get(User user)
|
void |
put(User user,
List groupNames)
|
void |
remove(List usernames)
Remove a list of users from the cache by username. |
void |
remove(User user)
Remove the cached list of groups for a particular user from
the cache. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupsForUserCache
public GroupsForUserCache(CacheManager cacheManager,
String cacheName)
put
public void put(User user,
List groupNames)
get
public List get(User user)
remove
public void remove(User user)
- Remove the cached list of groups for a particular user from
the cache. Typically used when the membership of a user has
been updated, so the cached list of groups is out of date.
It's not very efficient to iterate over the list and
remove the affected groups, so we just ditch the entire
cached list.
remove
public void remove(List usernames)
- Remove a list of users from the cache by username. Typically
used when a group has been removed, and all its members need
to have their cached groups cleared.