private void InitStorages() { if (Config.Settings.IsCachingEnabled) { Storages = new CoreCachingStorages(MemoryCache, Config.Settings, Resources.Errors); } }
/// <summary> /// Конструктор. /// </summary> /// <param name="resourceErrors">Ресурс ошибок.</param> /// <param name="storages">Хранилища.</param> public CoreCachingCache(CoreCachingResourceErrors resourceErrors, CoreCachingStorages storages) { ResourceErrors = resourceErrors; IsEnabled = Storages != null; if (IsEnabled) { GlobalStorageHelper = Storages?.Global?.Helper; GlobalStorageService = Storages?.Global?.Service; LocalStorageService = Storages?.Local?.Service; IsFaulty = GlobalStorageHelper != null && GlobalStorageHelper.IsFaulty; } }