Share via


IOutputCacheStore.SetAsync Method

Definition

Stores the given response in the response cache.

public System.Threading.Tasks.ValueTask SetAsync (string key, byte[] value, string[]? tags, TimeSpan validFor, System.Threading.CancellationToken cancellationToken);
abstract member SetAsync : string * byte[] * string[] * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function SetAsync (key As String, value As Byte(), tags As String(), validFor As TimeSpan, cancellationToken As CancellationToken) As ValueTask

Parameters

key
String

The cache key to store the response under.

value
Byte[]

The response cache entry to store.

tags
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