SqlServerCache 类

定义

使用 Microsoft SQL Server 数据库的分布式缓存实现。

public ref class SqlServerCache : Microsoft::Extensions::Caching::Distributed::IDistributedCache
public class SqlServerCache : Microsoft.Extensions.Caching.Distributed.IDistributedCache
type SqlServerCache = class
    interface IDistributedCache
Public Class SqlServerCache
Implements IDistributedCache
继承
SqlServerCache
实现

构造函数

SqlServerCache(IOptions<SqlServerCacheOptions>)

使用 Microsoft SQL Server 数据库的分布式缓存实现。

方法

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
Get(String)

获取具有给定键的值。

GetAsync(String)

使用 Microsoft SQL Server 数据库的分布式缓存实现。

GetAsync(String, CancellationToken)

获取具有给定键的值。

GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
Refresh(String)

基于缓存中某个值的键刷新该值,并重置其可调到期超时(如果有)。

RefreshAsync(String)

使用 Microsoft SQL Server 数据库的分布式缓存实现。

RefreshAsync(String, CancellationToken)

基于缓存中某个值的键刷新该值,并重置其可调到期超时(如果有)。

Remove(String)

删除具有给定键的值。

RemoveAsync(String)

使用 Microsoft SQL Server 数据库的分布式缓存实现。

RemoveAsync(String, CancellationToken)

删除具有给定键的值。

Set(String, Byte[], DistributedCacheEntryOptions)

设置具有给定键的值。

SetAsync(String, Byte[], DistributedCacheEntryOptions)

使用 Microsoft SQL Server 数据库的分布式缓存实现。

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)

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

适用于