IDistributedCache 介面

定義

表示序列化值的分散式快取。Represents a distributed cache of serialized values.

public interface class IDistributedCache
public interface IDistributedCache
type IDistributedCache = interface
Public Interface IDistributedCache
衍生

方法

Get(String)

取得具有指定索引鍵的值。Gets a value with the given key.

GetAsync(String)
GetAsync(String, CancellationToken)

取得具有指定索引鍵的值。Gets a value with the given key.

Refresh(String)

根據快取索引鍵重新整理快取中的值,重設滑動期限逾時 (如有)。Refreshes a value in the cache based on its key, resetting its sliding expiration timeout (if any).

RefreshAsync(String)
RefreshAsync(String, CancellationToken)

根據快取索引鍵重新整理快取中的值,重設滑動期限逾時 (如有)。Refreshes a value in the cache based on its key, resetting its sliding expiration timeout (if any).

Remove(String)

移除具有指定索引鍵的值。Removes the value with the given key.

RemoveAsync(String)
RemoveAsync(String, CancellationToken)

移除具有指定索引鍵的值。Removes the value with the given key.

Set(String, Byte[], DistributedCacheEntryOptions)

使用指定的索引鍵設定值。Sets a value with the given key.

SetAsync(String, Byte[], DistributedCacheEntryOptions)
SetAsync(String, Byte[], DistributedCacheEntryOptions, CancellationToken)

使用指定的索引鍵設定值。Sets the value with the given key.

擴充方法

GetString(IDistributedCache, String)

使用指定的索引鍵,從指定的快取中取得字串。Gets a string from the specified cache with the specified key.

GetStringAsync(IDistributedCache, String)

以非同步方式,使用指定的索引鍵,從指定的快取中取得字串。Asynchronously gets a string from the specified cache with the specified key.

GetStringAsync(IDistributedCache, String, CancellationToken)

以非同步方式,使用指定的索引鍵,從指定的快取中取得字串。Asynchronously gets a string from the specified cache with the specified key.

Set(IDistributedCache, String, Byte[])

使用指定的索引鍵,在指定的快取中設定位元組序列。Sets a sequence of bytes in the specified cache with the specified key.

SetAsync(IDistributedCache, String, Byte[])

以非同步方式,使用指定的索引鍵,在指定的快取中設定位元組序列。Asynchronously sets a sequence of bytes in the specified cache with the specified key.

SetAsync(IDistributedCache, String, Byte[], CancellationToken)

以非同步方式,使用指定的索引鍵,在指定的快取中設定位元組序列。Asynchronously sets a sequence of bytes in the specified cache with the specified key.

SetString(IDistributedCache, String, String)

使用指定的索引鍵,在指定的快取中設定字串。Sets a string in the specified cache with the specified key.

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

使用指定的索引鍵,在指定的快取中設定字串。Sets a string in the specified cache with the specified key.

SetStringAsync(IDistributedCache, String, String)

以非同步方式,使用指定的索引鍵,在指定的快取中設定字串。Asynchronously sets a string in the specified cache with the specified key.

SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions)

以非同步方式,使用指定的索引鍵,在指定的快取中設定字串。Asynchronously sets a string in the specified cache with the specified key.

SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions, CancellationToken)

以非同步方式,使用指定的索引鍵,在指定的快取中設定字串。Asynchronously sets a string in the specified cache with the specified key.

SetStringAsync(IDistributedCache, String, String, CancellationToken)

以非同步方式,使用指定的索引鍵,在指定的快取中設定字串。Asynchronously sets a string in the specified cache with the specified key.

適用於