Open sandboxFocus

Method SetItemAsyncCore

SetItemAsyncCore(string, CacheItem, CancellationToken)

Asynchronously sets a cache item. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API. The default implementation is to call the synchronous SetItemCore(string, CacheItem) method.

Declaration
protected override ValueTask SetItemAsyncCore(string key, CacheItem item, CancellationToken cancellationToken)
Parameters
Type Name Description
string key

The key of the cache item.

CacheItem item

The cache item.

CancellationToken cancellationToken

A CancellationToken.

Returns
Type Description
ValueTask

A Task.

Overrides