DistributedCacheEntryOptions 类

定义

提供项的 IDistributedCache缓存选项。

public ref class DistributedCacheEntryOptions
public class DistributedCacheEntryOptions
type DistributedCacheEntryOptions = class
Public Class DistributedCacheEntryOptions
继承
DistributedCacheEntryOptions

构造函数

名称 说明
DistributedCacheEntryOptions()

提供项的 IDistributedCache缓存选项。

属性

名称 说明
AbsoluteExpiration

获取或设置缓存项的绝对到期日期。

AbsoluteExpirationRelativeToNow

获取或设置相对于现在的绝对过期时间。

SlidingExpiration

获取或设置缓存项在删除前可能处于非活动状态(例如未访问)的时间。 这不会延长超出绝对过期的条目生存期(如果已设置)。

方法

名称 说明
Equals(Object)

确定指定的对象是否等于当前对象。

(继承自 Object)
GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

扩展方法

名称 说明
SetAbsoluteExpiration(DistributedCacheEntryOptions, DateTimeOffset)

设置缓存项的绝对到期日期。

SetAbsoluteExpiration(DistributedCacheEntryOptions, TimeSpan)

设置相对于现在的绝对过期时间。

SetSlidingExpiration(DistributedCacheEntryOptions, TimeSpan)

设置缓存项在删除前可能处于非活动状态(例如未访问)的时间。 这不会延长超出绝对过期的条目生存期(如果已设置)。

适用于