public async Task Appand(string key, T obj) { var cachedItems = await _cache.Get<List<T>>(key); if (cachedItems == null) cachedItems = new List<T>(); else if (cachedItems.Any(x => x.Id == obj.Id)) { var item = cachedItems.First(x => x.Id == obj.Id); cachedItems.Remove(item); } cachedItems.Add(obj); await _cache.Remove(key); await _cache.Set(key, cachedItems, null); }
public async Task Remove(string key) { await _redisStore.Remove(key); }