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

Microsoft.Extensions.Caching.Memory.ICacheEntry

public interface ICacheEntry : IDisposable
Represents an entry in the IMemoryCache implementation. When Disposed, is committed to the cache.

Gets or sets an absolute expiration date for the cache entry.

Gets or sets an absolute expiration time, relative to now.

IList<IChangeToken> ExpirationTokens { get; }

Gets the IChangeToken instances which cause the cache entry to expire.

object Key { get; }

Gets the key of the cache entry.

Gets or sets the callbacks will be fired after the cache entry is evicted from the cache.

Gets or sets the priority for keeping the cache entry in the cache during a cleanup. The default is Normal.

long? Size { get; set; }

Gets or set the size of the cache entry value.

TimeSpan? SlidingExpiration { get; set; }

Gets or sets how long a cache entry can be inactive (e.g. not accessed) before it will be removed. This will not extend the entry lifetime beyond the absolute expiration (if set).

object Value { get; set; }

Gets or set the value of the cache entry.