Ejemplo n.º 1
0
 public T AddOrGetExisting(string key, Func <T> valueFactory)
 {
     return(_cache.AddOrGetExisting($"{_cacheKeyPrefix}:{key}", delegate()
     {
         return valueFactory();
     }, new TimeSpan(0, _duration, 0)));
 }