public override IDictionary <string, CacheValue <T> > BaseGetAll <T>(IEnumerable <string> cacheKeys) { IDictionary <string, CacheValue <T> > cacheValues = _memoryProvider.GetAll <T>(cacheKeys); if (cacheValues != null && cacheValues.Count > 0) { string[] alreadKeys = cacheValues.Keys.ToArray(); cacheKeys = cacheKeys.Where(r => !alreadKeys.Contains(r)).ToList(); } if (cacheKeys != null && cacheKeys.Count() > 0) { IDictionary <string, CacheValue <T> > datas = _redisProvider.GetAll <T>(cacheKeys); if (datas != null && datas.Count > 0) { foreach (var item in datas) { if (item.Value.HasValue) { cacheValues.Add(item.Key, item.Value); } } } } return(cacheValues); }