IBufferDistributedCache.Set 方法

定义

设置或覆盖缓存项。

public:
 void Set(System::String ^ key, System::Buffers::ReadOnlySequence<System::Byte> value, Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options);
public void Set (string key, System.Buffers.ReadOnlySequence<byte> value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options);
abstract member Set : string * System.Buffers.ReadOnlySequence<byte> * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions -> unit
Public Sub Set (key As String, value As ReadOnlySequence(Of Byte), options As DistributedCacheEntryOptions)

参数

key
String

要创建的条目的键。

value
ReadOnlySequence<Byte>

此缓存项的值。

options
DistributedCacheEntryOptions

条目的缓存选项。

注解

这在功能上类似于 Set(String, Byte[], DistributedCacheEntryOptions),但避免了数组分配。

适用于