Share via


DistributedCacheExtensions 类

定义

用于设置 IDistributedCache 中的数据的扩展方法。

public ref class DistributedCacheExtensions abstract sealed
public static class DistributedCacheExtensions
type DistributedCacheExtensions = class
Public Module DistributedCacheExtensions
继承
DistributedCacheExtensions

方法

GetString(IDistributedCache, String)

使用指定的键从指定的缓存中获取字符串。

GetStringAsync(IDistributedCache, String, CancellationToken)

使用指定的键从指定的缓存异步获取字符串。

Set(IDistributedCache, String, Byte[])

使用指定的键设置指定缓存中的字节序列。

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

使用指定的键异步设置指定缓存中的字节序列。

SetString(IDistributedCache, String, String)

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

SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)

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

SetStringAsync(IDistributedCache, String, String, CancellationToken)

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

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

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

适用于