public bool AddAgentToGroup(string RequestingAgentID, string AgentID, UUID GroupID, GroupMembershipDelegate d) { GroupMembershipData membership = d(); if (membership == null) { return(false); } lock (m_Cache) { // first, remove everything! add a user is a heavy-duty op m_Cache.Clear(); m_Cache.AddOrUpdate("active-" + AgentID.ToString(), membership, GROUPS_CACHE_TIMEOUT); m_Cache.AddOrUpdate("membership-" + AgentID.ToString() + "-" + GroupID.ToString(), membership, GROUPS_CACHE_TIMEOUT); } return(true); }