public void GetValue() { var redisStore = new RedisStore(ConnectionString); var client = new HttpClient(new CachingHandler(redisStore) { InnerHandler = new HttpClientHandler() }); var httpResponseMessage = client.GetAsync(CacheableResource1).Result; HttpResponseMessage response = null; var tryGetValue = redisStore.TryGetValue(new CacheKey(CacheableResource1, new string[0]), out response); Assert.That(tryGetValue); Assert.IsNotNull(response); }
public void TestConnectivity() { var redisStore = new RedisStore(ConnectionString); HttpResponseMessage responseMessage = null; Console.WriteLine(redisStore.TryGetValue(new CacheKey("http://google.com", new string[0]), out responseMessage)); }