diff options
author | Melanie | 2012-03-04 16:23:46 +0000 |
---|---|---|
committer | Melanie | 2012-03-04 16:23:46 +0000 |
commit | 182f5efbe94881c22af82bc71566c49dd02ed8f8 (patch) | |
tree | 2b26c2657cfb91464008d8e305566500bc3cdd9e /OpenSim/Services | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Zero velocity when drag-copying (diff) | |
download | opensim-SC_OLD-182f5efbe94881c22af82bc71566c49dd02ed8f8.zip opensim-SC_OLD-182f5efbe94881c22af82bc71566c49dd02ed8f8.tar.gz opensim-SC_OLD-182f5efbe94881c22af82bc71566c49dd02ed8f8.tar.bz2 opensim-SC_OLD-182f5efbe94881c22af82bc71566c49dd02ed8f8.tar.xz |
Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/Connectors/Grid/GridServiceConnector.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index 1599a56..7deaf95 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs | |||
@@ -48,6 +48,9 @@ namespace OpenSim.Services.Connectors | |||
48 | 48 | ||
49 | private string m_ServerURI = String.Empty; | 49 | private string m_ServerURI = String.Empty; |
50 | 50 | ||
51 | private ExpiringCache<ulong, GridRegion> m_regionCache = | ||
52 | new ExpiringCache<ulong, GridRegion>(); | ||
53 | |||
51 | public GridServicesConnector() | 54 | public GridServicesConnector() |
52 | { | 55 | { |
53 | } | 56 | } |
@@ -265,6 +268,11 @@ namespace OpenSim.Services.Connectors | |||
265 | 268 | ||
266 | public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) | 269 | public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) |
267 | { | 270 | { |
271 | ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y); | ||
272 | |||
273 | if (m_regionCache.Contains(regionHandle)) | ||
274 | return (GridRegion)m_regionCache[regionHandle]; | ||
275 | |||
268 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 276 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |
269 | 277 | ||
270 | sendData["SCOPEID"] = scopeID.ToString(); | 278 | sendData["SCOPEID"] = scopeID.ToString(); |
@@ -306,6 +314,8 @@ namespace OpenSim.Services.Connectors | |||
306 | else | 314 | else |
307 | m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition received null reply"); | 315 | m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition received null reply"); |
308 | 316 | ||
317 | m_regionCache.Add(regionHandle, rinfo, TimeSpan.FromSeconds(600)); | ||
318 | |||
309 | return rinfo; | 319 | return rinfo; |
310 | } | 320 | } |
311 | 321 | ||