public CacheFactoryComponentResult CreateCacheComponents() { var cacheEngine = CreateCacheEngine(); var dependencyMgr = new GenericDependencyManager(cacheEngine, _logger, _config); var featureSupport = new WebFeatureSupport(); var result = CacheFactoryComponentResult.Create(cacheEngine, dependencyMgr, featureSupport); return(result); }
public override CacheFactoryComponentResult CreateCacheComponents() { var cacheEngine = CreateCacheEngine(); var dependencyMgr = new GenericDependencyManager(cacheEngine, Logger, CacheConfiguration); var featureSupport = new memcachedFeatureSupport(); var result = CacheFactoryComponentResult.Create(cacheEngine, dependencyMgr, featureSupport); return(result); }
public override CacheFactoryComponentResult CreateCacheComponents() { var cacheEngine = CreateCacheEngine(); ICacheDependencyManager dependencyMgr = null; if (CacheConfiguration.DependencyManagerToUse == CacheDependencyManagerTypes.Generic) { dependencyMgr = new GenericDependencyManager(cacheEngine, Logger, CacheConfiguration); } else { dependencyMgr = new RedisDependencyManager(cacheEngine, Logger, _redisConnection.GetDatabase(), CacheConfiguration); } var featureSupport = new RedisFeatureSupport(); var result = CacheFactoryComponentResult.Create(cacheEngine, dependencyMgr, featureSupport); return(result); }
public static ICacheProvider BuildCacheProvider(this CacheFactoryComponentResult cacheComponents, CacheConfig config, ILogging logger) { return(new CacheProvider(cacheComponents.Cache, logger, config, cacheComponents.DependencyManager, cacheComponents.FeatureSupport)); }