diff options
author | root | 2013-09-07 17:58:32 +0200 |
---|---|---|
committer | root | 2013-09-07 17:58:32 +0200 |
commit | 844ae7720e02d01b839986e0ba8fab93f9c93c05 (patch) | |
tree | 8d8f4c2628261fd75922af215bcf609ad62fa577 /OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs | |
parent | Add two argument constructor to GridInstantMessage (diff) | |
download | opensim-SC-844ae7720e02d01b839986e0ba8fab93f9c93c05.zip opensim-SC-844ae7720e02d01b839986e0ba8fab93f9c93c05.tar.gz opensim-SC-844ae7720e02d01b839986e0ba8fab93f9c93c05.tar.bz2 opensim-SC-844ae7720e02d01b839986e0ba8fab93f9c93c05.tar.xz |
Bring Core Groups up to current version
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs b/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs index e7d38c2..3ac74fc 100644 --- a/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs +++ b/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs | |||
@@ -53,7 +53,7 @@ namespace OpenSim.Groups | |||
53 | private ForeignImporter m_ForeignImporter; | 53 | private ForeignImporter m_ForeignImporter; |
54 | 54 | ||
55 | private Dictionary<string, bool> m_ActiveRequests = new Dictionary<string, bool>(); | 55 | private Dictionary<string, bool> m_ActiveRequests = new Dictionary<string, bool>(); |
56 | private const int GROUPS_CACHE_TIMEOUT = 5 * 60; // 5 minutes | 56 | private const int GROUPS_CACHE_TIMEOUT = 1 * 60; // 1 minutes |
57 | 57 | ||
58 | // This all important cache cahces objects of different types: | 58 | // This all important cache cahces objects of different types: |
59 | // group-<GroupID> or group-<Name> => ExtendedGroupRecord | 59 | // group-<GroupID> or group-<Name> => ExtendedGroupRecord |
@@ -209,13 +209,10 @@ namespace OpenSim.Groups | |||
209 | public void SetAgentActiveGroup(string AgentID, GroupMembershipDelegate d) | 209 | public void SetAgentActiveGroup(string AgentID, GroupMembershipDelegate d) |
210 | { | 210 | { |
211 | GroupMembershipData activeGroup = d(); | 211 | GroupMembershipData activeGroup = d(); |
212 | if (activeGroup != null) | 212 | string cacheKey = "active-" + AgentID.ToString(); |
213 | { | 213 | lock (m_Cache) |
214 | string cacheKey = "active-" + AgentID.ToString(); | 214 | if (m_Cache.Contains(cacheKey)) |
215 | lock (m_Cache) | 215 | m_Cache.AddOrUpdate(cacheKey, activeGroup, GROUPS_CACHE_TIMEOUT); |
216 | if (m_Cache.Contains(cacheKey)) | ||
217 | m_Cache.AddOrUpdate(cacheKey, activeGroup, GROUPS_CACHE_TIMEOUT); | ||
218 | } | ||
219 | } | 216 | } |
220 | 217 | ||
221 | public ExtendedGroupMembershipData GetAgentActiveMembership(string AgentID, GroupMembershipDelegate d) | 218 | public ExtendedGroupMembershipData GetAgentActiveMembership(string AgentID, GroupMembershipDelegate d) |