Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Microsoft.​Extensions.​Caching.​Memory.​MemoryCacheEntryOptions
Assembly: Microsoft.Extensions.Caching.Abstractions
Inheritance: object → MemoryCacheEntryOptions
Represents the cache options applied to an entry of the <see cref="T:Microsoft.Extensions.Caching.Memory.IMemoryCache" /> instance.
Properties
AbsoluteExpiration
Gets or sets an absolute expiration date for the cache entry.
public
System.​TimeSpan?
AbsoluteExpirationRelativeToNow
Gets or sets an absolute expiration time, relative to now.
public
System.​Collections.​Generic.​IList<​Primitives.​IChangeToken>
ExpirationTokens
Gets the <see cref="T:Microsoft.Extensions.Primitives.IChangeToken" /> instances which cause the cache entry to expire.
public
System.​Collections.​Generic.​IList<​PostEvictionCallbackRegistration>
PostEvictionCallbacks
Gets or sets the callbacks will be fired after the cache entry is evicted from the cache.
public
CacheItemPriority
Priority
Gets or sets the priority for keeping the cache entry in the cache during a
memory pressure triggered cleanup. The default is <see cref="F:Microsoft.Extensions.Caching.Memory.CacheItemPriority.Normal" /> .
public
long?
Size
Gets or sets the size of the cache entry value.
public
System.​TimeSpan?
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).
Methods
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object