语言

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
实现

构造函数

名称 说明
RedisCache(IOptions<RedisCacheOptions>)

方法

名称 说明
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)

扩展方法

名称 说明
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)

使用指定的键异步设置指定缓存中的字符串。

适用于