CacheEntryExtensions Class

Definition

Provides extensions methods for ICacheEntry operations.

public ref class CacheEntryExtensions abstract sealed
public static class CacheEntryExtensions
type CacheEntryExtensions = class
Public Module CacheEntryExtensions
Inheritance
CacheEntryExtensions

Methods

AddExpirationToken(ICacheEntry, IChangeToken)

Expire the cache entry if the given IChangeToken expires.

RegisterPostEvictionCallback(ICacheEntry, PostEvictionDelegate)

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

RegisterPostEvictionCallback(ICacheEntry, PostEvictionDelegate, Object)

The given callback will be fired 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 (e.g. not accessed) before it will be removed. This will not extend the entry lifetime beyond the absolute expiration (if set).

SetValue(ICacheEntry, Object)

Sets the value of the cache entry.

Applies to