CacheInsertOptions 类

定义

表示包含缓存插入选项的类型。Represents the type that contains cache insert options.

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

构造函数

CacheInsertOptions()

初始化此类的新实例。Initializes a new instance of this class.

属性

AbsoluteExpiration

获取或设置一个值,该值指示是否应在指定的持续时间之后逐出缓存项。Gets or sets a value that indicates whether a cache entry should be evicted after a specified duration.

Dependencies

获取或设置缓存依赖项。Gets or sets the cache dependency.

OnRemovedCallback

获取或设置 CacheItemRemovedCallback 回调。Gets or sets the CacheItemRemovedCallback callback.

Priority

获取或设置优先级。Gets or sets the priority.

SlidingExpiration

获取或设置上次访问插入对象的时间与对象过期时间之间的间隔。Gets or sets the interval between the time the inserted object is last accessed and the time at which that object expires. 如果此值为 20 分钟的等效值,此对象将过期并将在上次访问后 20 分钟从缓存中删除。If this value is the equivalent of 20 minutes, the object will expire and be removed from the cache 20 minutes after it was last accessed.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于