mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
* Remove user profile from cache when they log out from a region.
* A much more significant fix is required to clean up the cache when a user moves out of a region, but really better handling of delayed inventory cache updates needs to be written first, and possibly better affinity to cut down agent inventory requests when the move is between two regions hosted on the same server.
This commit is contained in:
@@ -86,7 +86,30 @@ namespace OpenSim.Framework.Communications.Cache
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove this user's profile cache.
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <returns>true if the user was successfully removed, false otherwise</returns>
|
||||
public bool RemoveUser(LLUUID userID)
|
||||
{
|
||||
lock (m_userProfiles)
|
||||
{
|
||||
if (m_userProfiles.ContainsKey(userID))
|
||||
{
|
||||
m_userProfiles.Remove(userID);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat("[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userID);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request the inventory data for the given user. This will occur asynchronously if running on a grid
|
||||
|
||||
@@ -247,7 +247,7 @@ namespace OpenSim.Framework.UserManagement
|
||||
{
|
||||
return GenerateFailureResponse(
|
||||
"key",
|
||||
"The agent inventory service is not responding. Please notify your region operator.",
|
||||
"The agent inventory service is not responding. Please notify your login region operator.",
|
||||
"false");
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace OpenSim.Grid.InventoryServer
|
||||
public InventoryCollection GetUserInventory(Guid rawUserID)
|
||||
{
|
||||
// uncomment me to simulate an overloaded inventory server
|
||||
//Thread.Sleep(40000);
|
||||
//Thread.Sleep(25000);
|
||||
|
||||
LLUUID userID = new LLUUID(rawUserID);
|
||||
|
||||
|
||||
@@ -1696,6 +1696,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions);
|
||||
|
||||
RemoveCapsHandler(agentID);
|
||||
|
||||
CommsManager.UserProfileCacheService.RemoveUser(agentID);
|
||||
}
|
||||
|
||||
m_eventManager.TriggerClientClosed(agentID);
|
||||
|
||||
Reference in New Issue
Block a user