private void SetupCache(CacheSettingsBuilder builder) { if (!CacheEnabled) { return; } builder.UseSecondLevelCache() .UseQueryCache() .QueryCacheFactory <StandardQueryCacheFactory>(); MrCMSConfigSection mrCMSSection = WebConfigurationManager.GetSection("mrcms") as MrCMSConfigSection; if (mrCMSSection != null) { builder.ProviderClass(mrCMSSection.CacheProvider.AssemblyQualifiedName); if (mrCMSSection.MinimizePuts) { builder.UseMinimalPuts(); } } else { builder.ProviderClass <SysCacheProvider>(); } }
public override void Initialize(CacheSettingsBuilder builder) { try { TrySetMultiplexer(); builder.ProviderClass <RequestRecoveryRedisCacheProvider>(); } catch { builder.ProviderClass <SysCacheProvider>(); } }
private static void SetupCacheSettingsBuilder(CacheSettingsBuilder c) { c = c.UseQueryCache().UseSecondLevelCache(); bool useCache = (new Feature_RedisCache()).FeatureEnabled; if (useCache) { c = c.ProviderClass <RedisCacheProvider>(); } }
private void SetupCache(CacheSettingsBuilder builder) { if (!CacheEnabled) { return; } builder.UseSecondLevelCache() .UseQueryCache() .QueryCacheFactory <StandardQueryCacheFactory>(); var providerType = TypeHelper.GetTypeByName(WebConfigurationManager.AppSettings["mrcms-cache-provider"]); var cacheInitializers = NHibernateCacheInitializers.Initializers; if (providerType != null && cacheInitializers.ContainsKey(providerType)) { var initializer = MrCMSKernel.Kernel.Get(cacheInitializers[providerType]) as CacheProviderInitializer; if (initializer != null) { initializer.Initialize(builder); return; } } builder.ProviderClass <SysCacheProvider>(); }
private void SetupCache(CacheSettingsBuilder builder) { if (!CacheEnabled) return; builder.UseSecondLevelCache() .UseQueryCache() .QueryCacheFactory<StandardQueryCacheFactory>(); var mrCMSSection = WebConfigurationManager.GetSection("mrcms") as MrCMSConfigSection; if (mrCMSSection != null) { builder.ProviderClass(mrCMSSection.CacheProvider.AssemblyQualifiedName); if (mrCMSSection.MinimizePuts) builder.UseMinimalPuts(); } else builder.ProviderClass<SysCacheProvider>(); }