public GridRegion Get(UUID scopeID, ulong handle, out bool inCache) { inCache = false; GridRegion rinfo = null; ScopedRegionPosition pos = new ScopedRegionPosition(scopeID, handle); if (m_PositionCache.TryGetValue(pos, out rinfo)) { inCache = true; return(rinfo); } return(null); }
public void Cache(UUID scopeID, UUID regionID, GridRegion rinfo) { // for now, do not cache negative results; this is because // we need to figure out how to handle regions coming online // in a timely way if (rinfo == null) { return; } ScopedRegionUUID id = new ScopedRegionUUID(scopeID, regionID); // Cache even null accounts m_UUIDCache.AddOrUpdate(id, rinfo, CACHE_EXPIRATION_SECONDS); if (rinfo != null) { ScopedRegionName name = new ScopedRegionName(scopeID, rinfo.RegionName); m_NameCache.AddOrUpdate(name, id, CACHE_EXPIRATION_SECONDS); ScopedRegionPosition pos = new ScopedRegionPosition(scopeID, rinfo.RegionHandle); m_PositionCache.AddOrUpdate(pos, rinfo, CACHE_EXPIRATION_SECONDS); } }
public void Cache(UUID scopeID, UUID regionID, GridRegion rinfo) { // for now, do not cache negative results; this is because // we need to figure out how to handle regions coming online // in a timely way if (rinfo == null) return; ScopedRegionUUID id = new ScopedRegionUUID(scopeID,regionID); // Cache even null accounts m_UUIDCache.AddOrUpdate(id, rinfo, CACHE_EXPIRATION_SECONDS); if (rinfo != null) { ScopedRegionName name = new ScopedRegionName(scopeID,rinfo.RegionName); m_NameCache.AddOrUpdate(name, id, CACHE_EXPIRATION_SECONDS); ScopedRegionPosition pos = new ScopedRegionPosition(scopeID, rinfo.RegionHandle); m_PositionCache.AddOrUpdate(pos, rinfo, CACHE_EXPIRATION_SECONDS); } }
public GridRegion Get(UUID scopeID, ulong handle, out bool inCache) { inCache = false; GridRegion rinfo = null; ScopedRegionPosition pos = new ScopedRegionPosition(scopeID, handle); if (m_PositionCache.TryGetValue(pos, out rinfo)) { inCache = true; return rinfo; } return null; }