CacheEntryExtensions.SetAbsoluteExpiration 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
SetAbsoluteExpiration(ICacheEntry, DateTimeOffset) |
設定快取項目的絕對到期日。 |
SetAbsoluteExpiration(ICacheEntry, TimeSpan) |
設定相對於 now 的絕對到期時間。 |
SetAbsoluteExpiration(ICacheEntry, DateTimeOffset)
設定快取項目的絕對到期日。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Caching::Memory::ICacheEntry ^ SetAbsoluteExpiration(Microsoft::Extensions::Caching::Memory::ICacheEntry ^ entry, DateTimeOffset absolute);
public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetAbsoluteExpiration (this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, DateTimeOffset absolute);
static member SetAbsoluteExpiration : Microsoft.Extensions.Caching.Memory.ICacheEntry * DateTimeOffset -> Microsoft.Extensions.Caching.Memory.ICacheEntry
<Extension()>
Public Function SetAbsoluteExpiration (entry As ICacheEntry, absolute As DateTimeOffset) As ICacheEntry
參數
- entry
- ICacheEntry
- absolute
- DateTimeOffset
表示到期時間的 DateTimeOffset,以絕對字詞表示。
傳回
用於鏈結的 ICacheEntry。
適用於
SetAbsoluteExpiration(ICacheEntry, TimeSpan)
設定相對於 now 的絕對到期時間。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Caching::Memory::ICacheEntry ^ SetAbsoluteExpiration(Microsoft::Extensions::Caching::Memory::ICacheEntry ^ entry, TimeSpan relative);
public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetAbsoluteExpiration (this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, TimeSpan relative);
static member SetAbsoluteExpiration : Microsoft.Extensions.Caching.Memory.ICacheEntry * TimeSpan -> Microsoft.Extensions.Caching.Memory.ICacheEntry
<Extension()>
Public Function SetAbsoluteExpiration (entry As ICacheEntry, relative As TimeSpan) As ICacheEntry
參數
- entry
- ICacheEntry
傳回
用於鏈結的 ICacheEntry。