Example #1
0
 public async Task <T> AddOrGetExistingAsync(string key, Func <T> valueFactory)
 {
     return(await _cache.AddOrGetExistingAsync($"{_cacheKeyPrefix}:{key}", delegate()
     {
         return valueFactory();
     }, new TimeSpan(0, _duration, 0)));
 }