DistributedCacheEntryOptions 類別

定義

IDistributedCache 中的項目提供快取選項。

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

建構函式

DistributedCacheEntryOptions()

IDistributedCache 中的項目提供快取選項。

屬性

AbsoluteExpiration

取得或設定快取項目的絕對到期日。

AbsoluteExpirationRelativeToNow

取得或設定相對於 now 的絕對到期時間。

SlidingExpiration

取得或設定快取項目在移除前可處於非使用中狀態的時間長度 (例如,未經存取)。 這不會讓項目存留期超過絕對到期的時間 (如已設定)。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

擴充方法

SetAbsoluteExpiration(DistributedCacheEntryOptions, DateTimeOffset)

設定快取項目的絕對到期日。

SetAbsoluteExpiration(DistributedCacheEntryOptions, TimeSpan)

設定相對於 now 的絕對到期時間。

SetSlidingExpiration(DistributedCacheEntryOptions, TimeSpan)

或設定快取項目在移除前可處於非使用中狀態的時間長度 (例如,未經存取)。 這不會讓項目存留期超過絕對到期的時間 (如已設定)。

適用於