コード例 #1
0
        public void ContainsKey(bool compressValues, bool useBasic)
        {
            TimeSpan            cacheLifeTime = TimeSpan.FromMinutes(5);
            RedisCachingService service       = RedisHelpers.GetRedis(compressValues: compressValues, useBasic: useBasic);

            service.Clear();
            string cachableKey = RedisHelpers.CachableKey;
            Foobar cachable    = RedisHelpers.GetCachableObject();

            service.Cache <Foobar>(cachableKey, cachable);
            Assert.Single(service);
            Assert.True(service.ContainsKey(cachableKey));
        }