MemoryCacheExtensions extension
Extension methods for MemoryCache.
- on
Methods
-
get<
T> (Object key) → T? -
Available on MemoryCache, provided by the MemoryCacheExtensions extension
Gets the value associated withkey. -
getOrCreate<
T> (Object key, T factory(CacheEntry entry)) → T -
Available on MemoryCache, 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(CacheEntry entry)) → Future<T> -
Available on MemoryCache, provided by the MemoryCacheExtensions extension
Async version of getOrCreate. -
set<
T> (Object key, T value, [MemoryCacheEntryOptions? options]) → T -
Available on MemoryCache, provided by the MemoryCacheExtensions extension
Sets the value forkey.