MemoryCacheExtensions extension
Extension methods for IMemoryCache.
- on
Methods
-
get<
T> (Object key) → T? -
Available on IMemoryCache, provided by the MemoryCacheExtensions extension
Gets the value associated withkey. -
getOrCreate<
T> (Object key, T factory(ICacheEntry entry)) → T -
Available on IMemoryCache, provided by the MemoryCacheExtensions extension
Gets the value associated withkey, or creates and caches a new value usingfactoryif not found. -
getOrCreateAsync<
T> (Object key, Future< T> factory(ICacheEntry entry)) → Future<T> -
Available on IMemoryCache, provided by the MemoryCacheExtensions extension
Async version of getOrCreate. -
set<
T> (Object key, T value, [MemoryCacheEntryOptions? options]) → T -
Available on IMemoryCache, provided by the MemoryCacheExtensions extension
Sets the value forkey.