CachingBackend.SetItemAsyncCore Method
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 virtual 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 |
Returns
Type | Description |
---|---|
ValueTask | A Task. |