/// <summary> /// Refresh cached data. /// </summary> /// <param name="userContext">User context.</param> protected override void RefreshCache(IUserContext userContext) { lock (FactorOrigins) { FactorOrigins.Clear(); } lock (FactorUpdateModes) { FactorUpdateModes.Clear(); } lock (FactorFieldTypes) { FactorFieldTypes.Clear(); } lock (PeriodTypes) { PeriodTypes.Clear(); } lock (Periods) { Periods.Clear(); } lock (IndividualCategories) { IndividualCategories.Clear(); } lock (FactorFieldEnums) { FactorFieldEnums.Clear(); } lock (FactorDataTypes) { FactorDataTypes.Clear(); } lock (Factors) { Factors.Clear(); } lock (FactorTrees) { FactorTrees.Clear(); } lock (FactorTreeNodes) { FactorTreeNodes.Clear(); } lock (OrganismGroups) { OrganismGroups.Clear(); } }
/// <summary> /// Get organism groups for specified locale. /// </summary> /// <param name="locale">Currently used locale.</param> /// <param name='organismGroupType'>Type of organism groups.</param> /// <returns>Organism groups for specified locale.</returns> protected virtual OrganismGroupList GetOrganismGroups(ILocale locale, OrganismGroupType organismGroupType) { OrganismGroupList organismGroups = null; String cacheKey; cacheKey = locale.ISOCode + "#" + organismGroupType; if (OrganismGroups.ContainsKey(cacheKey)) { organismGroups = (OrganismGroupList)(OrganismGroups[cacheKey]); } return(organismGroups); }
/// <summary> /// Refresh cached data. /// </summary> /// <param name="userContext">User context.</param> protected virtual void RefreshCache(IUserContext userContext) { FactorOrigins.Clear(); FactorUpdateModes.Clear(); FactorFieldTypes.Clear(); PeriodTypes.Clear(); Periods.Clear(); IndividualCategories.Clear(); FactorFieldEnums.Clear(); FactorDataTypes.Clear(); Factors.Clear(); FactorTrees.Clear(); FactorTreeNodes.Clear(); OrganismGroups.Clear(); }