InMemoryCache Class

InMemoryCache Class

This is the default in-memory cache module implementation. This module gets registered with the DI container automatically if no other cache module has been registered.

public sealed class InMemoryCache: IAsyncCache, IInitializableProvider

Inheritance  Object InMemoryCache

Implements  IAsyncCache, IInitializableProvider

Constructors

Name Description
InMemoryCache(...)

Properties

Name Description
CacheOptions
CanClear
IsDistributedCached
IsInitialized
Name

Methods

Name Description
ClearCacheAsync()
GetAsync<T>(IEnumerable<string>)
GetOrCreateAsync<T>(string, Func<Task<T>>)
GetOrCreateAsync<T>(IEnumerable<string>, Func<IEnumerable<string>, Task<IDictionary<string, T>>>)
GetOrDefaultAsync<T>(string, T)
InitializeAsync()
RemoveAsync(string)
SetAsync<T>(string, T)
SetAsync<T>(string, T, TimeSpan)
SetAsync<T>(IDictionary<string, T>)