SqlServerCache 类
定义
使用 Microsoft SQL Server 数据库的分布式缓存实现。Distributed cache implementation using Microsoft SQL Server database.
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>) |
方法
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| Get(String) |
获取具有给定键的值。Gets a value with the given key. |
| GetAsync(String) | |
| GetAsync(String, CancellationToken) |
获取具有给定键的值。Gets a value with the given key. |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| 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. |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |
扩展方法
| 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. |