public void InsertToCache(string key, IContainerItemCollection value) { if (string.IsNullOrEmpty(key) || value == null) { return; } var cacheKey = GetFinalKey(key); //if (value is IDictionary) //{ // //Dictionary类型 //} _cache.HashSet(cacheKey, value.ToHashEntries()); //_cache.SetEntry(cacheKey, obj); #if DEBUG var value1 = _cache.HashGetAll(cacheKey);//正常情况下可以得到 //_cache.GetValue(cacheKey); #endif }
public void Update(string key, IContainerItemCollection value) { _cache.HashSet(key, value.ToHashEntries()); }
public void InsertToCache(string key, IContainerItemCollection value) { if (string.IsNullOrEmpty(key) || value == null) { return; } var cacheKey = GetFinalKey(key); //if (value is IDictionary) //{ // //Dictionary类型 //} _cache.HashSet(cacheKey, value.ToHashEntries()); //_cache.SetEntry(cacheKey, obj); #if DEBUG var value1 = _cache.HashGetAll(cacheKey);//正常情况下可以得到 //_cache.GetValue(cacheKey); #endif }
public void Update(string key, IContainerItemCollection value) { _cache.HashSet(key, value.ToHashEntries()); }