IBufferDistributedCache.SetAsync Methode

Definitie

Asynchroon stelt een cachevermelding in of overschrijft deze.

public System.Threading.Tasks.ValueTask SetAsync(string key, System.Buffers.ReadOnlySequence<byte> value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.Threading.CancellationToken token = default);
abstract member SetAsync : string * System.Buffers.ReadOnlySequence<byte> * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function SetAsync (key As String, value As ReadOnlySequence(Of Byte), options As DistributedCacheEntryOptions, Optional token As CancellationToken = Nothing) As ValueTask

Parameters

key
String

De sleutel van de vermelding die moet worden gemaakt.

value
ReadOnlySequence<Byte>

De waarde voor deze cachevermelding.

options
DistributedCacheEntryOptions

De cacheopties voor de waarde.

token
CancellationToken

De CancellationToken functie voor het doorgeven van meldingen dat de bewerking moet worden geannuleerd.

Retouren

Opmerkingen

Deze methode is functioneel vergelijkbaar met SetAsync(String, Byte[], DistributedCacheEntryOptions, CancellationToken), maar vermijdt de matrixtoewijzing.

Van toepassing op