public void Expire(string id) { if (m_LogLevel >= 2) { m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Expiring Asset {0}.", id); } try { string filename = GetFileName(id); if (File.Exists(filename)) { File.Delete(filename); } if (m_MemoryCacheEnabled) { m_MemoryCache.Remove(id); } } catch (Exception e) { LogException(e); } }
public void Expire(string id) { if (m_LogLevel >= 2) { m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Expiring Asset {0}", id); } try { if (m_FileCacheEnabled) { string filename = GetFileName(id); if (File.Exists(filename)) { File.Delete(filename); } } if (m_MemoryCacheEnabled) { m_MemoryCache.Remove(id); } } catch (Exception e) { m_log.WarnFormat( "[FLOTSAM ASSET CACHE]: Failed to expire cached file {0}. Exception {1} {2}", id, e.Message, e.StackTrace); } }
public void Expire(string id) { if (m_logLevel >= 2) { MainConsole.Instance.DebugFormat("[Flotsam Asset Cache]]: Expiring Asset {0}.", id); } try { string filename = GetFileName(id); lock (m_fileCacheLock) { if (File.Exists(filename)) { File.Delete(filename); } } if (m_MemoryCacheEnabled) { m_MemoryCache.Remove(id); } } catch (Exception e) { LogException(e); } }
public void Remove(UUID id) { lock (accessLock) { if (!m_UUIDCache.Contains(id)) { return; } UserAccount account = null; if (m_UUIDCache.TryGetValue(id, out account) && account != null) { m_NameCache.Remove(account.Name); } m_UUIDCache.Remove(id); } }
public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat) { if (m_Infos.Contains(userID)) { m_Infos.Remove(userID); } return(m_RemoteConnector.LoggedOut(userID, sessionID, region, position, lookat)); }
public bool RemoveCapability(UUID id) { lock (syncRoot) { if (expiringCaps.Remove(id)) { return(true); } else { return(fixedCaps.Remove(id)); } } }
public void Remove(string name) { if (!m_NameCache.Contains(name)) { return; } UUID uuid = UUID.Zero; if (m_NameCache.TryGetValue(name, out uuid)) { m_NameCache.Remove(name); m_UUIDCache.Remove(uuid); } }
public void RemoveAll(UUID userID) { if (m_RootFolders.Contains(userID)) { m_RootFolders.Remove(userID); } if (m_FolderTypes.Contains(userID)) { m_FolderTypes.Remove(userID); } if (m_Inventories.Contains(userID)) { m_Inventories.Remove(userID); } }
public void OnTeleportLureRequest(UUID lureID, uint teleportFlags, IClientAPI client) { if (!(client.Scene is Scene)) { return; } // Scene scene = (Scene)(client.Scene); GridInstantMessage im = null; if (m_PendingLures.TryGetValue(lureID, out im)) { m_PendingLures.Remove(lureID); Lure(client, teleportFlags, im); } else { m_log.DebugFormat("[HG LURE MODULE]: pending lure {0} not found", lureID); } }
public void Invalidate(UUID userID) { m_UUIDCache.Remove(userID); }
public void InvalidateCache(UUID userID) { m_accountCache.Remove(userID); }
public void AddAgentToGroupRole(string RequestingAgentID, string AgentID, UUID GroupID, UUID RoleID, BooleanDelegate d) { if (d()) { lock (m_Cache) { // update the cached role string cacheKey = "role-" + RoleID.ToString(); object obj; if (m_Cache.TryGetValue(cacheKey, out obj)) { GroupRolesData r = (GroupRolesData)obj; r.Members++; } // add this agent to the list of role members cacheKey = "rolemembers-" + RequestingAgentID.ToString() + "-" + GroupID.ToString(); if (m_Cache.TryGetValue(cacheKey, out obj)) { try { // This may throw an exception, in which case the agentID is not a UUID but a full ID // In that case, let's just remove the whoe things from the cache UUID id = new UUID(AgentID); List <ExtendedGroupRoleMembersData> xx = (List <ExtendedGroupRoleMembersData>)obj; List <GroupRoleMembersData> rmlist = xx.ConvertAll <GroupRoleMembersData>(m_ForeignImporter.ConvertGroupRoleMembersData); GroupRoleMembersData rm = new GroupRoleMembersData(); rm.MemberID = id; rm.RoleID = RoleID; rmlist.Add(rm); } catch { m_Cache.Remove(cacheKey); } } // Remove the cached info about this agent's roles // because we don't have enough local info about the new role cacheKey = "roles-" + GroupID.ToString() + "-" + AgentID.ToString(); if (m_Cache.Contains(cacheKey)) { m_Cache.Remove(cacheKey); } } } }
public UUID CreateGroup(UUID RequestingAgentID, GroupRecordDelegate d) { //m_log.DebugFormat("[Groups.RemoteConnector]: Creating group {0}", name); //reason = string.Empty; //ExtendedGroupRecord group = m_GroupsService.CreateGroup(RequestingAgentID.ToString(), name, charter, showInList, insigniaID, // membershipFee, openEnrollment, allowPublish, maturePublish, founderID, out reason); ExtendedGroupRecord group = d(); if (group == null) { return(UUID.Zero); } if (group.GroupID != UUID.Zero) { lock (m_Cache) { m_Cache.Add("group-" + group.GroupID.ToString(), group, GROUPS_CACHE_TIMEOUT); if (m_Cache.Contains("memberships-" + RequestingAgentID.ToString())) { m_Cache.Remove("memberships-" + RequestingAgentID.ToString()); } } } return(group.GroupID); }
public void Remove(UUID userID, string name) { m_UUIDCache.Remove(userID); m_NameCache.Remove(name); }