* 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.
0.6.0-stable
Justin Clarke Casey 2008-04-20 20:36:06 +00:00
parent 8b177bf4a8
commit 3d3eec436a
4 changed files with 28 additions and 3 deletions

View File

@ -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

View File

@ -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");
}

View File

@ -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);

View File

@ -1696,6 +1696,8 @@ namespace OpenSim.Region.Environment.Scenes
m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions);
RemoveCapsHandler(agentID);
CommsManager.UserProfileCacheService.RemoveUser(agentID);
}
m_eventManager.TriggerClientClosed(agentID);