CacheExtensions.GetOrCreateAsync(IMemoryCache, Object, Func<ICacheEntry,Task<TItem>>) CacheExtensions.GetOrCreateAsync(IMemoryCache, Object, Func<ICacheEntry,Task<TItem>>) CacheExtensions.GetOrCreateAsync(IMemoryCache, Object, Func<ICacheEntry,Task<TItem>>) Method

Definition

[System.Runtime.CompilerServices.AsyncStateMachine(typeof(Microsoft.Extensions.Caching.Memory.CacheExtensions/<GetOrCreateAsync>d__9`1))]
public static System.Threading.Tasks.Task<TItem> GetOrCreateAsync<TItem> (this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, Func<Microsoft.Extensions.Caching.Memory.ICacheEntry,System.Threading.Tasks.Task<TItem>> factory);
static member GetOrCreateAsync : Microsoft.Extensions.Caching.Memory.IMemoryCache * obj * Func<Microsoft.Extensions.Caching.Memory.ICacheEntry, System.Threading.Tasks.Task<'Item>> -> System.Threading.Tasks.Task<'Item>
<Extension()>
Public Function GetOrCreateAsync(Of TItem) (cache As IMemoryCache, key As Object, factory As Func(Of ICacheEntry, Task(Of TItem))) As Task(Of TItem)
Type Parameters
TItem
Parameters
factory
Func<ICacheEntry,Task<TItem>>
Returns
Task<TItem>

Applies to