Microsoft.Extensions.Caching.Memory.CacheEntryExtensions
Provides extensions methods for ICacheEntry operations.
Expires the cache entry if the given IChangeToken expires.
public static ICacheEntry RegisterPostEvictionCallback(this ICacheEntry entry, PostEvictionDelegate callback)
Fires the given callback after the cache entry is evicted from the cache.
public static ICacheEntry RegisterPostEvictionCallback(this ICacheEntry entry, PostEvictionDelegate callback, object state)
Fires the given callback after the cache entry is evicted from the cache.
Sets an absolute expiration time, relative to now.
Sets an absolute expiration date for the cache entry.
Applies the values of an existing MemoryCacheEntryOptions to the entry.
Sets the priority for keeping the cache entry in the cache during a memory pressure tokened cleanup.
Sets the size of the cache entry value.
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).
Sets the value of the cache entry.