Interface ICacheEntry<TKey, TEntity>
Represents an entry in the IMemoryCache<TKey, TEntry> implementation.
public interface ICacheEntry<TKey, TEntity> : IDisposable where TKey : notnull
Type Parameters
TKey
TEntity
- Inherited Members
- Extension Methods
Properties
AbsoluteExpiration
Gets or sets an absolute expiration date for the cache entry.
DateTimeOffset? AbsoluteExpiration { get; set; }
Property Value
AbsoluteExpirationRelativeToNow
Gets or sets an absolute expiration time, relative to now.
TimeSpan? AbsoluteExpirationRelativeToNow { get; set; }
Property Value
ExpirationTokens
Gets the IChangeToken instances which cause the cache entry to expire.
IList<IChangeToken> ExpirationTokens { get; }
Property Value
Key
Gets the key of the cache entry.
TKey Key { get; }
Property Value
- TKey
PostEvictionCallbacks
Gets or sets the callbacks will be fired after the cache entry is evicted from the cache.
IList<PostEvictionCallbackRegistration<TKey>> PostEvictionCallbacks { get; }
Property Value
Priority
Gets or sets the priority for keeping the cache entry in the cache during a cleanup. The default is Normal.
CacheItemPriority Priority { get; set; }
Property Value
Size
Gets or set the size of the cache entry value.
long? Size { get; set; }
Property Value
- long?
SlidingExpiration
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).
TimeSpan? SlidingExpiration { get; set; }
Property Value
Value
Gets or set the value of the cache entry.
TEntity? Value { get; set; }
Property Value
- TEntity