- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
public async Task AddOrUpdateAsync<T>(string key, T value) where T : class
{
ConcurrentQueue<T> queue = null;
await Task.Run(() =>
{
var cacheItem = _cache.GetCacheItem(key);
if (cacheItem != null)
{
queue = cacheItem.Value as ConcurrentQueue<T>;
}
});
await Task.Run(() => queue.Enqueue(value));
}
Комментарии (0) RSS
Добавить комментарий