diff options
author | UbitUmarov | 2015-09-01 14:54:35 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-01 14:54:35 +0100 |
commit | 371c9dd2af01a2e7422ec901ee1f80757284a78c (patch) | |
tree | 058d2a513cacb12efcce0c0df0ae14ad135dbfe2 /OpenSim/Services/Connectors/Grid | |
parent | remove lixo (diff) | |
parent | dont change camera on crossings (diff) | |
download | opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.zip opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.gz opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.bz2 opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.xz |
bad merge?
Diffstat (limited to 'OpenSim/Services/Connectors/Grid')
-rw-r--r-- | OpenSim/Services/Connectors/Grid/GridServicesConnector.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs index 9e55356..d208f1e 100644 --- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs | |||
@@ -49,6 +49,9 @@ namespace OpenSim.Services.Connectors | |||
49 | 49 | ||
50 | private string m_ServerURI = String.Empty; | 50 | private string m_ServerURI = String.Empty; |
51 | 51 | ||
52 | private ExpiringCache<ulong, GridRegion> m_regionCache = | ||
53 | new ExpiringCache<ulong, GridRegion>(); | ||
54 | |||
52 | public GridServicesConnector() | 55 | public GridServicesConnector() |
53 | { | 56 | { |
54 | } | 57 | } |
@@ -275,6 +278,11 @@ namespace OpenSim.Services.Connectors | |||
275 | 278 | ||
276 | public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) | 279 | public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) |
277 | { | 280 | { |
281 | ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y); | ||
282 | |||
283 | if (m_regionCache.Contains(regionHandle)) | ||
284 | return (GridRegion)m_regionCache[regionHandle]; | ||
285 | |||
278 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 286 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |
279 | 287 | ||
280 | sendData["SCOPEID"] = scopeID.ToString(); | 288 | sendData["SCOPEID"] = scopeID.ToString(); |
@@ -316,6 +324,8 @@ namespace OpenSim.Services.Connectors | |||
316 | else | 324 | else |
317 | m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition received null reply"); | 325 | m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition received null reply"); |
318 | 326 | ||
327 | m_regionCache.Add(regionHandle, rinfo, TimeSpan.FromSeconds(600)); | ||
328 | |||
319 | return rinfo; | 329 | return rinfo; |
320 | } | 330 | } |
321 | 331 | ||