MemoryCacheEntryExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides extensions methods for MemoryCacheEntryOptions operations.
public ref class MemoryCacheEntryExtensions abstract sealed
public static class MemoryCacheEntryExtensions
type MemoryCacheEntryExtensions = class
Public Module MemoryCacheEntryExtensions
- Inheritance
-
MemoryCacheEntryExtensions
Methods
AddExpirationToken(MemoryCacheEntryOptions, IChangeToken) |
Expire the cache entry if the given IChangeToken expires. |
RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate) |
The given callback will be fired after the cache entry is evicted from the cache. |
RegisterPostEvictionCallback(MemoryCacheEntryOptions, PostEvictionDelegate, Object) |
The given callback will be fired after the cache entry is evicted from the cache. |
SetAbsoluteExpiration(MemoryCacheEntryOptions, DateTimeOffset) |
Sets an absolute expiration date for the cache entry. |
SetAbsoluteExpiration(MemoryCacheEntryOptions, TimeSpan) |
Sets an absolute expiration time, relative to now. |
SetPriority(MemoryCacheEntryOptions, CacheItemPriority) |
Sets the priority for keeping the cache entry in the cache during a memory pressure tokened cleanup. |
SetSize(MemoryCacheEntryOptions, Int64) |
Sets the size of the cache entry value. |
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for