Пример #1
0
        public void InsertToCache(string key, IContainerItemCollection value)
        {
            if (string.IsNullOrEmpty(key) || value == null)
            {
                return;
            }

            var cacheKey = GetFinalKey(key);

            //if (value is IDictionary)
            //{
            //    //Dictionary类型
            //}

            _cache.StringSet(cacheKey, value.Serialize());

#if DEBUG
            var value1 = _cache.StringGet(cacheKey);//正常情况下可以得到 //_cache.GetValue(cacheKey);
#endif
        }
Пример #2
0
        public void Update(string key, IContainerItemCollection value)
        {
            var cacheKey = GetFinalKey(key);

            _cache.StringSet(cacheKey, value.Serialize());
        }
 public void Update(string key, IContainerItemCollection value)
 {
     var cacheKey = GetFinalKey(key);
     _cache.StringSet(cacheKey, value.Serialize());
 }
        public void InsertToCache(string key, IContainerItemCollection value)
        {
            if (string.IsNullOrEmpty(key) || value == null)
            {
                return;
            }

            var cacheKey = GetFinalKey(key);

            //if (value is IDictionary)
            //{
            //    //Dictionary类型
            //}

            _cache.StringSet(cacheKey, value.Serialize());

            #if DEBUG
            var value1 = _cache.StringGet(cacheKey);//正常情况下可以得到 //_cache.GetValue(cacheKey);
            #endif
        }