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);
         ScopedRegionHandle hnd = new ScopedRegionHandle(scopeID, rinfo.RegionHandle);
         m_HandleCache.AddOrUpdate(hnd,id,CACHE_EXPIRATION_SECONDS);
     }
 }
        public GridRegion Get(UUID scopeID, ulong handle, out bool inCache)
        {
            inCache = false;

            ScopedRegionHandle hnd = new ScopedRegionHandle(scopeID, handle);

            ScopedRegionUUID id;
            if (m_HandleCache.TryGetValue(hnd, out id))
            {
                GridRegion rinfo = null;
                if (m_UUIDCache.TryGetValue(id, out rinfo))
                {
                    inCache = true;
                    return rinfo;
                }
            }

            return null;
        }