<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="11.0.0-preview.1.26104.118" />

Microsoft.Extensions.Caching.Distributed.MemoryDistributedCache

public class MemoryDistributedCache : IDistributedCache
public MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions> optionsAccessor)

public MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions> optionsAccessor, ILoggerFactory loggerFactory)

public byte[] Get(string key)

public Task<byte[]> GetAsync(string key, CancellationToken token = default)

public void Refresh(string key)

public Task RefreshAsync(string key, CancellationToken token = default)

public void Remove(string key)

public Task RemoveAsync(string key, CancellationToken token = default)

public void Set(string key, byte[] value, DistributedCacheEntryOptions options)

public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default)