示例#1
0
 public async Task <TItem> GetOrCreateAsync <TItem>(
     object key,
     Func <Task <TItem> > factory,
     CacheDuration cacheDuration)
 {
     return(await _keyedLock.RunWithLock(key, () => GetOrCreateAsyncInternal(key, factory, cacheDuration)));
 }