More on mantis #6666 -- Groups V2 remote connector.

cpu-performance
Diva Canto 2013-06-09 20:20:37 -07:00
parent 4e2e69bd25
commit e741e5ebce
1 changed files with 4 additions and 7 deletions

View File

@ -209,13 +209,10 @@ namespace OpenSim.Groups
public void SetAgentActiveGroup(string AgentID, GroupMembershipDelegate d) public void SetAgentActiveGroup(string AgentID, GroupMembershipDelegate d)
{ {
GroupMembershipData activeGroup = d(); GroupMembershipData activeGroup = d();
if (activeGroup != null) string cacheKey = "active-" + AgentID.ToString();
{ lock (m_Cache)
string cacheKey = "active-" + AgentID.ToString(); if (m_Cache.Contains(cacheKey))
lock (m_Cache) m_Cache.AddOrUpdate(cacheKey, activeGroup, GROUPS_CACHE_TIMEOUT);
if (m_Cache.Contains(cacheKey))
m_Cache.AddOrUpdate(cacheKey, activeGroup, GROUPS_CACHE_TIMEOUT);
}
} }
public ExtendedGroupMembershipData GetAgentActiveMembership(string AgentID, GroupMembershipDelegate d) public ExtendedGroupMembershipData GetAgentActiveMembership(string AgentID, GroupMembershipDelegate d)