IDistributedCache 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示序列化值的分散式快取。
public interface class IDistributedCache
public interface IDistributedCache
type IDistributedCache = interface
Public Interface IDistributedCache
- 衍生
方法
Get(String) |
取得具有指定索引鍵的值。 |
GetAsync(String, CancellationToken) |
取得具有指定索引鍵的值。 |
Refresh(String) |
根據快取索引鍵重新整理快取中的值,重設滑動期限逾時 (如有)。 |
RefreshAsync(String, CancellationToken) |
根據快取索引鍵重新整理快取中的值,重設滑動期限逾時 (如有)。 |
Remove(String) |
移除具有指定索引鍵的值。 |
RemoveAsync(String, CancellationToken) |
移除具有指定索引鍵的值。 |
Set(String, Byte[], DistributedCacheEntryOptions) |
使用指定的索引鍵設定值。 |
SetAsync(String, Byte[], DistributedCacheEntryOptions, CancellationToken) |
使用指定的索引鍵設定值。 |
擴充方法
GetString(IDistributedCache, String) |
使用指定的索引鍵,從指定的快取中取得字串。 |
GetStringAsync(IDistributedCache, String, CancellationToken) |
以非同步方式,使用指定的索引鍵,從指定的快取中取得字串。 |
Set(IDistributedCache, String, Byte[]) |
使用指定的索引鍵,在指定的快取中設定位元組序列。 |
SetAsync(IDistributedCache, String, Byte[], CancellationToken) |
以非同步方式,使用指定的索引鍵,在指定的快取中設定位元組序列。 |
SetString(IDistributedCache, String, String) |
使用指定的索引鍵,在指定的快取中設定字串。 |
SetString(IDistributedCache, String, String, DistributedCacheEntryOptions) |
使用指定的索引鍵,在指定的快取中設定字串。 |
SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions, CancellationToken) |
以非同步方式,使用指定的索引鍵,在指定的快取中設定字串。 |
SetStringAsync(IDistributedCache, String, String, CancellationToken) |
以非同步方式,使用指定的索引鍵,在指定的快取中設定字串。 |
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應