private ICache GetCache(CacheConfig config) { ICache cache = null; var normalisedCacheToUse = !string.IsNullOrWhiteSpace(config.CacheToUse) ? config.CacheToUse.ToLowerInvariant() : string.Empty; switch (normalisedCacheToUse) { case CacheTypes.MemoryCache: cache = new MemoryCacheAdapter(_logger); break; case CacheTypes.WebCache: cache = new WebCacheAdapter(_logger); break; case CacheTypes.AppFabricCache: cache = new AppFabricCacheAdapter(_logger, config); break; case CacheTypes.memcached: cache = new memcachedAdapter(_logger, config); break; case CacheTypes.redis: cache = new RedisCacheAdapter(_logger, config); break; default: cache = new MemoryCacheAdapter(_logger); break; } return(cache); }
public void SetUp() { ca = AppFabricCacheAdapterFactory.Create("test_region"); }