Share via


IOutputCacheBufferStore.SetAsync Method

Definition

Stores the given response in the response cache.

public System.Threading.Tasks.ValueTask SetAsync (string key, System.Buffers.ReadOnlySequence<byte> value, ReadOnlyMemory<string> tags, TimeSpan validFor, System.Threading.CancellationToken cancellationToken);
abstract member SetAsync : string * System.Buffers.ReadOnlySequence<byte> * ReadOnlyMemory<string> * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function SetAsync (key As String, value As ReadOnlySequence(Of Byte), tags As ReadOnlyMemory(Of String), validFor As TimeSpan, cancellationToken As CancellationToken) As ValueTask

Parameters

key
String

The cache key to store the response under.

value
ReadOnlySequence<Byte>

The response cache entry to store; this value is only defined for the duration of the method, and should not be stored without making a copy.

tags
ReadOnlyMemory<String>

The tags associated with the cache entry to store.

validFor
TimeSpan

The amount of time the entry will be kept in the cache before expiring, relative to now.

cancellationToken
CancellationToken

Indicates that the operation should be cancelled.

Returns

Applies to