MetalamaAPI documentationPatterns APIMetalama.​Patterns.​Caching.​BackendsCaching­BackendSet­Item­Async
Open sandboxFocus

CachingBackend.SetItemAsync Method

SetItemAsync(String, CacheItem, CancellationToken)

Asynchronously sets a cache item.

Declaration
public ValueTask SetItemAsync(string key, CacheItem item, CancellationToken cancellationToken = null)
Parameters
Type Name Description
System.String key

The key of the cache item.

CacheItem item

The cache item.

System.Threading.CancellationToken cancellationToken

A System.Threading.CancellationToken.

Returns
Type Description
System.Threading.Tasks.ValueTask

A System.Threading.Tasks.Task.