DistributedCacheEntryOptions Class

Namespace
Microsoft.Extensions.Caching.Distributed
Assemblies
  • Microsoft.Extensions.Caching.Abstractions

Syntax

public class DistributedCacheEntryOptions
class Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions

Properties

Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions.AbsoluteExpiration

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

Return type:System.Nullable<System.DateTimeOffset>
public DateTimeOffset? AbsoluteExpiration { get; set; }
Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions.AbsoluteExpirationRelativeToNow

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

Return type:System.Nullable<System.TimeSpan>
public TimeSpan? AbsoluteExpirationRelativeToNow { get; set; }
Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions.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).

Return type:System.Nullable<System.TimeSpan>
public TimeSpan? SlidingExpiration { get; set; }