mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Allow invalidating the users cache
This commit is contained in:
@@ -190,7 +190,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
//
|
||||
public bool StoreUserAccount(UserAccount data)
|
||||
{
|
||||
return UserAccountService.StoreUserAccount(data);
|
||||
bool ret = UserAccountService.StoreUserAccount(data);
|
||||
if (ret)
|
||||
m_Cache.Cache(data.PrincipalID, data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void InvalidateCache(UUID userID)
|
||||
{
|
||||
m_Cache.Invalidate(userID);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
@@ -61,6 +61,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
//m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
|
||||
}
|
||||
|
||||
public void Invalidate(UUID userID)
|
||||
{
|
||||
m_UUIDCache.Remove(userID);
|
||||
}
|
||||
|
||||
public UserAccount Get(UUID userID, out bool inCache)
|
||||
{
|
||||
UserAccount account = null;
|
||||
|
||||
Reference in New Issue
Block a user