aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs13
2 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
index 77f002e..ffe3fab 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
@@ -54,10 +54,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
54 public void Cache(GridRegion rinfo) 54 public void Cache(GridRegion rinfo)
55 { 55 {
56 if (rinfo != null) 56 if (rinfo != null)
57 this.Cache(rinfo.ScopeID,rinfo.RegionID,rinfo); 57 this.Cache(rinfo.ScopeID, rinfo);
58 } 58 }
59 59
60 public void Cache(UUID scopeID, UUID regionID, GridRegion rinfo) 60 public void Cache(UUID scopeID, GridRegion rinfo)
61 { 61 {
62 // for now, do not cache negative results; this is because 62 // for now, do not cache negative results; this is because
63 // we need to figure out how to handle regions coming online 63 // we need to figure out how to handle regions coming online
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
68 m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS); 68 m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS);
69 } 69 }
70 70
71 public void Cache(UUID scopeID, UUID regionID, GridRegion rinfo, float expireSeconds) 71 public void Cache(UUID scopeID, GridRegion rinfo, float expireSeconds)
72 { 72 {
73 // for now, do not cache negative results; this is because 73 // for now, do not cache negative results; this is because
74 // we need to figure out how to handle regions coming online 74 // we need to figure out how to handle regions coming online
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
index 1e1e8f8..6575cfd 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
@@ -183,7 +183,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
183 if (rinfo == null) 183 if (rinfo == null)
184 rinfo = m_RemoteGridService.GetRegionByUUID(scopeID, regionID); 184 rinfo = m_RemoteGridService.GetRegionByUUID(scopeID, regionID);
185 185
186 m_RegionInfoCache.Cache(scopeID,regionID,rinfo); 186 m_RegionInfoCache.Cache(scopeID, rinfo);
187 return rinfo; 187 return rinfo;
188 } 188 }
189 189
@@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
210 if (rinfo == null) 210 if (rinfo == null)
211 rinfo = m_RemoteGridService.GetRegionByPosition(scopeID, x, y); 211 rinfo = m_RemoteGridService.GetRegionByPosition(scopeID, x, y);
212 212
213 m_RegionInfoCache.Cache(rinfo); 213
214 214
215 if (rinfo == null) 215 if (rinfo == null)
216 { 216 {
@@ -219,16 +219,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
219 m_log.WarnFormat("[REMOTE GRID CONNECTOR]: Requested region {0}-{1} not found", regionX, regionY); 219 m_log.WarnFormat("[REMOTE GRID CONNECTOR]: Requested region {0}-{1} not found", regionX, regionY);
220 } 220 }
221 else 221 else
222 {
223 m_RegionInfoCache.Cache(scopeID, rinfo);
224
222 m_log.DebugFormat("[REMOTE GRID CONNECTOR]: GetRegionByPosition. Added region {0} to the cache. Pos=<{1},{2}>, RegionHandle={3}", 225 m_log.DebugFormat("[REMOTE GRID CONNECTOR]: GetRegionByPosition. Added region {0} to the cache. Pos=<{1},{2}>, RegionHandle={3}",
223 rinfo.RegionName, rinfo.RegionCoordX, rinfo.RegionCoordY, (rinfo == null) ? regionHandle : rinfo.RegionHandle); 226 rinfo.RegionName, rinfo.RegionCoordX, rinfo.RegionCoordY, (rinfo == null) ? regionHandle : rinfo.RegionHandle);
224 227 }
225 return rinfo; 228 return rinfo;
226 } 229 }
227 230
228 public GridRegion GetRegionByName(UUID scopeID, string regionName) 231 public GridRegion GetRegionByName(UUID scopeID, string regionName)
229 { 232 {
230 bool inCache = false; 233 bool inCache = false;
231 GridRegion rinfo = m_RegionInfoCache.Get(scopeID,regionName, out inCache); 234 GridRegion rinfo = m_RegionInfoCache.Get(scopeID, regionName, out inCache);
232 if (inCache) 235 if (inCache)
233 return rinfo; 236 return rinfo;
234 237
@@ -237,7 +240,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
237 rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName); 240 rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName);
238 241
239 // can't cache negative results for name lookups 242 // can't cache negative results for name lookups
240 m_RegionInfoCache.Cache(rinfo); 243 m_RegionInfoCache.Cache(scopeID, rinfo);
241 return rinfo; 244 return rinfo;
242 } 245 }
243 246