Share via


MemoryDistributedCache 類別

定義

使用的 IDistributedCache 實作 IMemoryCache

public ref class MemoryDistributedCache : Microsoft::Extensions::Caching::Distributed::IDistributedCache
public class MemoryDistributedCache : Microsoft.Extensions.Caching.Distributed.IDistributedCache
type MemoryDistributedCache = class
    interface IDistributedCache
Public Class MemoryDistributedCache
Implements IDistributedCache
繼承
MemoryDistributedCache
實作

建構函式

MemoryDistributedCache(IMemoryCache)

使用的 IDistributedCache 實作 IMemoryCache

MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions>)

建立新的 MemoryDistributedCache 執行個體。

MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions>, ILoggerFactory)

建立新的 MemoryDistributedCache 執行個體。

方法

Equals(Object)

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

(繼承來源 Object)
Get(String)

取得具有指定索引鍵的值。

GetAsync(String)

使用的 IDistributedCache 實作 IMemoryCache

GetAsync(String, CancellationToken)

取得具有指定索引鍵的值。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
Refresh(String)

根據快取索引鍵重新整理快取中的值,重設滑動期限逾時 (如有)。

RefreshAsync(String)

使用的 IDistributedCache 實作 IMemoryCache

RefreshAsync(String, CancellationToken)

根據快取索引鍵重新整理快取中的值,重設滑動期限逾時 (如有)。

Remove(String)

移除具有指定索引鍵的值。

RemoveAsync(String)

使用的 IDistributedCache 實作 IMemoryCache

RemoveAsync(String, CancellationToken)

移除具有指定索引鍵的值。

Set(String, Byte[], DistributedCacheEntryOptions)

使用指定的索引鍵設定值。

SetAsync(String, Byte[], DistributedCacheEntryOptions)

使用的 IDistributedCache 實作 IMemoryCache

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

使用指定的索引鍵設定值。

ToString()

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

(繼承來源 Object)

擴充方法

GetString(IDistributedCache, String)

使用指定的索引鍵,從指定的快取中取得字串。

GetStringAsync(IDistributedCache, String)

以非同步方式,使用指定的索引鍵,從指定的快取中取得字串。

GetStringAsync(IDistributedCache, String, CancellationToken)

以非同步方式,使用指定的索引鍵,從指定的快取中取得字串。

Set(IDistributedCache, String, Byte[])

使用指定的索引鍵,在指定的快取中設定位元組序列。

SetAsync(IDistributedCache, String, Byte[])

以非同步方式,使用指定的索引鍵,在指定的快取中設定位元組序列。

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

以非同步方式,使用指定的索引鍵,在指定的快取中設定位元組序列。

SetString(IDistributedCache, String, String)

使用指定的索引鍵,在指定的快取中設定字串。

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

使用指定的索引鍵,在指定的快取中設定字串。

SetStringAsync(IDistributedCache, String, String)

以非同步方式,使用指定的索引鍵,在指定的快取中設定字串。

SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions)

以非同步方式,使用指定的索引鍵,在指定的快取中設定字串。

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

以非同步方式,使用指定的索引鍵,在指定的快取中設定字串。

SetStringAsync(IDistributedCache, String, String, CancellationToken)

以非同步方式,使用指定的索引鍵,在指定的快取中設定字串。

適用於