PostSharp / / API Reference / Post­Sharp.​Patterns.​Caching.​Implementation / Caching­Backend / Set­Item­Async
Open sandbox

Method SetItemAsync

SetItemAsync(String, CacheItem, CancellationToken)

Asynchronously sets a cache item.

Declaration
public Task SetItemAsync([Required] string key, [Required] CacheItem item, CancellationToken cancellationToken = null)
Parameters
Type Name Description
String key

The key of the cache item.

CacheItem item

The cache item.

CancellationToken cancellationToken

A CancellationToken.

Returns
Type Description
Task

A Task.