MemoryCacheEntryExtensions.SetSlidingExpiration(MemoryCacheEntryOptions, TimeSpan) Method

Definition

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

public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetSlidingExpiration (this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, TimeSpan offset);
Parameters
offset
TimeSpan
Returns

Applies to