ICacheEntry Interface¶
Represents an entry in the Microsoft.Extensions.Caching.Memory.IMemoryCache
implementation.
- Namespace
Microsoft.Extensions.Caching.Memory
- Assemblies
- Microsoft.Extensions.Caching.Abstractions
Syntax¶
public interface ICacheEntry : IDisposable
-
interface
Microsoft.Extensions.Caching.Memory.
ICacheEntry
Properties¶
-
Microsoft.Extensions.Caching.Memory.ICacheEntry.
AbsoluteExpiration
¶ Gets or sets an absolute expiration date for the cache entry.
Return type: System.Nullable<System.DateTimeOffset> DateTimeOffset? AbsoluteExpiration { get; set; }
-
Microsoft.Extensions.Caching.Memory.ICacheEntry.
AbsoluteExpirationRelativeToNow
¶ Gets or sets an absolute expiration time, relative to now.
Return type: System.Nullable<System.TimeSpan> TimeSpan? AbsoluteExpirationRelativeToNow { get; set; }
-
Microsoft.Extensions.Caching.Memory.ICacheEntry.
ExpirationTokens
¶ Gets the
Microsoft.Extensions.Primitives.IChangeToken
instances which cause the cache entry to expire.Return type: System.Collections.Generic.IList<Microsoft.Extensions.Primitives.IChangeToken> IList<IChangeToken> ExpirationTokens { get; }
-
Microsoft.Extensions.Caching.Memory.ICacheEntry.
Key
¶ Gets the key of the cache entry.
Return type: System.Object object Key { get; }
-
Microsoft.Extensions.Caching.Memory.ICacheEntry.
PostEvictionCallbacks
¶ Gets or sets the callbacks will be fired after the cache entry is evicted from the cache.
Return type: System.Collections.Generic.IList<Microsoft.Extensions.Caching.Memory.PostEvictionCallbackRegistration> IList<PostEvictionCallbackRegistration> PostEvictionCallbacks { get; }
-
Microsoft.Extensions.Caching.Memory.ICacheEntry.
Priority
¶ Gets or sets the priority for keeping the cache entry in the cache during a memory pressure triggered cleanup. The default is
Microsoft.Extensions.Caching.Memory.CacheItemPriority.Normal
.Return type: Microsoft.Extensions.Caching.Memory.CacheItemPriority CacheItemPriority Priority { get; set; }
-
Microsoft.Extensions.Caching.Memory.ICacheEntry.
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).
Return type: System.Nullable<System.TimeSpan> TimeSpan? SlidingExpiration { get; set; }
-
Microsoft.Extensions.Caching.Memory.ICacheEntry.
Value
¶ Gets or set the value of the cache entry.
Return type: System.Object object Value { get; set; }
-