Class CacheExtensions
- Namespace
- Oqtane.Extensions
- Assembly
- Oqtane.Server.dll
public static class CacheExtensions
- Inheritance
-
CacheExtensions
Methods
GetOrCreateAsync<TItem>(IMemoryCache, string, Func<ICacheEntry, Task<TItem>>, bool)
public static Task<TItem> GetOrCreateAsync<TItem>(this IMemoryCache cache, string key, Func<ICacheEntry, Task<TItem>> factory, bool track)
Parameters
cache
IMemoryCache
key
string
factory
Func<ICacheEntry, Task<TItem>>
track
bool
Returns
- Task<TItem>
Type Parameters
TItem
GetOrCreate<TItem>(IMemoryCache, string, Func<ICacheEntry, TItem>, bool)
public static TItem GetOrCreate<TItem>(this IMemoryCache cache, string key, Func<ICacheEntry, TItem> factory, bool track)
Parameters
cache
IMemoryCache
key
string
factory
Func<ICacheEntry, TItem>
track
bool
Returns
- TItem
Type Parameters
TItem
Remove(IMemoryCache, string, bool)
public static void Remove(this IMemoryCache cache, string key, bool track)
Parameters
cache
IMemoryCache
key
string
track
bool