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

Definition

public:
generic <typename TItem>
[System::Runtime::CompilerServices::Extension]
 static TItem GetOrCreate(Microsoft::Extensions::Caching::Memory::IMemoryCache ^ cache, System::Object ^ key, Func<Microsoft::Extensions::Caching::Memory::ICacheEntry ^, TItem> ^ factory);
public static TItem GetOrCreate<TItem> (this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, Func<Microsoft.Extensions.Caching.Memory.ICacheEntry,TItem> factory);
static member GetOrCreate : Microsoft.Extensions.Caching.Memory.IMemoryCache * obj * Func<Microsoft.Extensions.Caching.Memory.ICacheEntry, 'Item> -> 'Item
<Extension()>
Public Function GetOrCreate(Of TItem) (cache As IMemoryCache, key As Object, factory As Func(Of ICacheEntry, TItem)) As TItem
Type Parameters
TItem
Parameters
factory
Func<ICacheEntry,TItem>
Returns

Applies to