<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.12" />

Microsoft.Extensions.Caching.Distributed.IDistributedCache

public interface IDistributedCache
Represents a distributed cache of serialized values.
namespace Microsoft.Extensions.Caching.Distributed { public interface IDistributedCache { byte[] Get(string key); Task<byte[]> GetAsync(string key, CancellationToken token = default(CancellationToken)); void Set(string key, byte[] value, DistributedCacheEntryOptions options); Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default(CancellationToken)); void Refresh(string key); Task RefreshAsync(string key, CancellationToken token = default(CancellationToken)); void Remove(string key); Task RemoveAsync(string key, CancellationToken token = default(CancellationToken)); } }