MemoryCacheEntryOptions MemoryCacheEntryOptions MemoryCacheEntryOptions Class

Definition

public class MemoryCacheEntryOptions
type MemoryCacheEntryOptions = class
Public Class MemoryCacheEntryOptions
Inheritance
MemoryCacheEntryOptionsMemoryCacheEntryOptionsMemoryCacheEntryOptions

Constructors

MemoryCacheEntryOptions() MemoryCacheEntryOptions() MemoryCacheEntryOptions()

Properties

AbsoluteExpiration AbsoluteExpiration AbsoluteExpiration

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

AbsoluteExpirationRelativeToNow AbsoluteExpirationRelativeToNow AbsoluteExpirationRelativeToNow

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

ExpirationTokens ExpirationTokens ExpirationTokens

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

PostEvictionCallbacks PostEvictionCallbacks PostEvictionCallbacks

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

Priority Priority Priority

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

Size Size Size

Gets or sets the size of the cache entry value.

SlidingExpiration SlidingExpiration 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).

Extension Methods

AddExpirationToken(MemoryCacheEntryOptions, IChangeToken) AddExpirationToken(MemoryCacheEntryOptions, IChangeToken) AddExpirationToken(MemoryCacheEntryOptions, IChangeToken)

Expire the cache entry if the given IChangeToken expires.

RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate) RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate) RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate)

The given callback will be fired after the cache entry is evicted from the cache.

RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate, Object) RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate, Object) RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate, Object)

The given callback will be fired after the cache entry is evicted from the cache.

SetAbsoluteExpiration(MemoryCacheEntryOptions, DateTimeOffset) SetAbsoluteExpiration(MemoryCacheEntryOptions, DateTimeOffset) SetAbsoluteExpiration(MemoryCacheEntryOptions, DateTimeOffset)

Sets an absolute expiration date for the cache entry.

SetAbsoluteExpiration(MemoryCacheEntryOptions, TimeSpan) SetAbsoluteExpiration(MemoryCacheEntryOptions, TimeSpan) SetAbsoluteExpiration(MemoryCacheEntryOptions, TimeSpan)

Sets an absolute expiration time, relative to now.

SetPriority(MemoryCacheEntryOptions, CacheItemPriority) SetPriority(MemoryCacheEntryOptions, CacheItemPriority) SetPriority(MemoryCacheEntryOptions, CacheItemPriority)

Sets the priority for keeping the cache entry in the cache during a memory pressure tokened cleanup.

SetSize(MemoryCacheEntryOptions, Int64) SetSize(MemoryCacheEntryOptions, Int64) SetSize(MemoryCacheEntryOptions, Int64)

Sets the size of the cache entry value.

SetSlidingExpiration(MemoryCacheEntryOptions, TimeSpan) SetSlidingExpiration(MemoryCacheEntryOptions, TimeSpan) SetSlidingExpiration(MemoryCacheEntryOptions, TimeSpan)

Sets how long the 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).

Applies to