IDistributedCache.Set(String, Byte[], DistributedCacheEntryOptions) Method

Definition

Sets a value with the given key.

C#
public void Set(string key, byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options);

Parameters

key
String

A string identifying the requested value.

value
Byte[]

The value to set in the cache.

options
DistributedCacheEntryOptions

The cache options for the value.

Applies to

Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)