public override ICacheClient CreateClient() { var cache = new DynamoDbCacheClient(DynamoTestBase.CreatePocoDynamo()); cache.InitSchema(); return(cache); }
public object Any(SetCacheProviderRequest request) { try { switch (request.provider) { case "memcache": var memcache = new MemcachedClientCache(); AppHost.Instance.Container.Register<ICacheClient>(memcache); return new HttpResult("Cache Provider switched to MemCache."); case "redis": AppHost.Instance.Container.Register<ICacheClient>(c => c.Resolve<IRedisClientsManager>().GetCacheClient()); return new HttpResult("Cache Provider switched to Redis."); case "aws": var aws = new DynamoDbCacheClient("", "", Amazon.RegionEndpoint.APSoutheast1); AppHost.Instance.Container.Register<ICacheClient>(aws); return new HttpResult("Cache Provider switched to Amazon Web Service DynamoDb Cache Client."); case "azure": AppHost.Instance.Container.Register<ICacheClient>(new AzureCacheClient("default")); return new HttpResult("Cache Provider switched to Microsoft Azure Cache Client."); default: AppHost.Instance.Container.Register<ICacheClient>(new MemoryCacheClient()); return new HttpResult("Cache Provider switched to In-Memory Cache Client."); } } catch { throw; } }
public static ICacheClient CreateCacheClient() { var cache = new DynamoDbCacheClient(CreatePocoDynamo()); cache.InitSchema(); return(cache); }
public object Any(SetCacheProviderRequest request) { try { switch (request.provider) { case "memcache": var memcache = new MemcachedClientCache(); AppHost.Instance.Container.Register <ICacheClient>(memcache); return(new HttpResult("Cache Provider switched to MemCache.")); case "redis": AppHost.Instance.Container.Register <ICacheClient>(c => c.Resolve <IRedisClientsManager>().GetCacheClient()); return(new HttpResult("Cache Provider switched to Redis.")); case "aws": var aws = new DynamoDbCacheClient("", "", Amazon.RegionEndpoint.APSoutheast1); AppHost.Instance.Container.Register <ICacheClient>(aws); return(new HttpResult("Cache Provider switched to Amazon Web Service DynamoDb Cache Client.")); case "azure": AppHost.Instance.Container.Register <ICacheClient>(new AzureCacheClient("default")); return(new HttpResult("Cache Provider switched to Microsoft Azure Cache Client.")); default: AppHost.Instance.Container.Register <ICacheClient>(new MemoryCacheClient()); return(new HttpResult("Cache Provider switched to In-Memory Cache Client.")); } } catch { throw; } }
public override ICacheClient CreateCacheClient() { var cache = new DynamoDbCacheClient(DynamoTestBase.CreatePocoDynamo()); cache.InitSchema(); return cache; }
public static ICacheClient CreateCacheClient() { var cache = new DynamoDbCacheClient(CreatePocoDynamo()); cache.InitSchema(); return cache; }