MemoryDistributedCache.Set 方法

定义

将与字节数组中的 IMemoryCache 键关联的指定项设置为字节数组。

public:
 virtual void Set(System::String ^ key, cli::array <System::Byte> ^ value, Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options);
public void Set(string key, byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options);
abstract member Set : string * byte[] * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions -> unit
override this.Set : string * byte[] * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions -> unit
Public Sub Set (key As String, value As Byte(), options As DistributedCacheEntryOptions)

参数

key
String

要设置的项的键。

value
Byte[]

要设置的项的字节数组值。

options
DistributedCacheEntryOptions

要设置的项的缓存选项。

实现

适用于