語言

RedisCache 類別

定義

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

建構函式

名稱 Description
RedisCache(IOptions<RedisCacheOptions>)

方法

名稱 Description
Dispose()
Get(String)
GetAsync(String, CancellationToken)
Refresh(String)
RefreshAsync(String, CancellationToken)
Remove(String)
RemoveAsync(String, CancellationToken)
Set(String, Byte[], DistributedCacheEntryOptions)
SetAsync(String, Byte[], DistributedCacheEntryOptions, CancellationToken)

擴充方法

名稱 Description
GetString(IDistributedCache, String)

從指定的快取取得一個字串,並附上指定的金鑰。

GetStringAsync(IDistributedCache, String, CancellationToken)

非同步地從指定的快取取得帶有指定金鑰的字串。

Set(IDistributedCache, String, Byte[])

在指定的快取中以指定的金鑰設定一串位元組。

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

非同步地在指定快取中以指定金鑰設定一串位元組。

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

在指定的快取中以指定的鍵值設定字串。

SetString(IDistributedCache, String, String)

在指定的快取中以指定的鍵值設定字串。

SetStringAsync(IDistributedCache, String, String, CancellationToken)

非同步地在指定快取中以指定金鑰設定字串。

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

非同步地在指定快取中以指定金鑰設定字串。

適用於