public static UserAccount getAccountByUUID(UUID uuid) { // We will resolve the toAgent's name from UUID UserAccount account = null;; // BEGIN ACCOUNT LOOKUP UserInfoCacheEntry ce; // Try cache if (!m_userInfoCache.TryGetValue(uuid, out ce)) { // The cache lookup failed, perform lookup to cache account = staticScene.UserAccountService.GetUserAccount(staticScene.RegionInfo.ScopeID, uuid); if (account == null) { m_userInfoCache[uuid] = null; // Cache negative // EXITS ACCOUNT LOOKUP } else { // Populate cache ce = new UserInfoCacheEntry(); ce.time = Util.EnvironmentTickCount(); ce.account = account; } // PUT NOTHING HERE } else { // Cache lookup succeded? if (ce != null) { // Yep account = ce.account; } } // END ACCOUNT LOOKUP return(account); }
public static UserAccount getAccountByUUID(UUID uuid) { // We will resolve the toAgent's name from UUID UserAccount account = null;; // BEGIN ACCOUNT LOOKUP UserInfoCacheEntry ce; // Try cache if (!m_userInfoCache.TryGetValue(uuid, out ce)) { // The cache lookup failed, perform lookup to cache account = staticScene.UserAccountService.GetUserAccount(staticScene.RegionInfo.ScopeID, uuid); if (account == null) { m_userInfoCache[uuid] = null; // Cache negative // EXITS ACCOUNT LOOKUP } else { // Populate cache ce = new UserInfoCacheEntry(); ce.time = Util.EnvironmentTickCount(); ce.account = account; } // PUT NOTHING HERE } else { // Cache lookup succeded? if (ce != null) { // Yep account = ce.account; } } // END ACCOUNT LOOKUP return account; }