Deli z drugimi prek


ICacheEntry Interface

Definition

Represents an entry in the IMemoryCache implementation. When Disposed, is committed to the cache.

public interface class ICacheEntry : IDisposable
public interface ICacheEntry : IDisposable
type ICacheEntry = interface
    interface IDisposable
Public Interface ICacheEntry
Implements IDisposable
Implements

Properties

AbsoluteExpiration

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

AbsoluteExpirationRelativeToNow

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

ExpirationTokens

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

Key

Gets the key of the cache entry.

PostEvictionCallbacks

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

Priority

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

Size

Gets or set the size of the cache entry value.

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

Value

Gets or set the value of the cache entry.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from IDisposable)

Extension Methods

AddExpirationToken(ICacheEntry, IChangeToken)

Expires the cache entry if the given IChangeToken expires.

RegisterPostEvictionCallback(ICacheEntry, PostEvictionDelegate, Object)

Fires the given callback after the cache entry is evicted from the cache.

RegisterPostEvictionCallback(ICacheEntry, PostEvictionDelegate)

Fires the given callback after the cache entry is evicted from the cache.

SetAbsoluteExpiration(ICacheEntry, DateTimeOffset)

Sets an absolute expiration date for the cache entry.

SetAbsoluteExpiration(ICacheEntry, TimeSpan)

Sets an absolute expiration time, relative to now.

SetOptions(ICacheEntry, MemoryCacheEntryOptions)

Applies the values of an existing MemoryCacheEntryOptions to the entry.

SetPriority(ICacheEntry, CacheItemPriority)

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

SetSize(ICacheEntry, Int64)

Sets the size of the cache entry value.

SetSlidingExpiration(ICacheEntry, TimeSpan)

Sets how long the cache entry can be inactive (for example, not accessed) before it will be removed. This method does not extend the entry lifetime beyond the absolute expiration (if set).

SetValue(ICacheEntry, Object)

Sets the value of the cache entry.

Applies to