<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="11.0.0-preview.2.26159.112" />

Microsoft.Extensions.Caching.Memory.IMemoryCache

public interface IMemoryCache : IDisposable
Represents a local in-memory cache whose values are not serialized.

Create or overwrite an entry in the cache.

Gets a snapshot of the cache statistics if available.

void Remove(object key)

Removes the object associated with the given key.

bool TryGetValue(object key, out object value)

Gets the item associated with this key if present.