PostSharp.ILAPI ReferencePost­Sharp.​Patterns.​Caching.​BackendsNon­Blocking­Caching­Backend­EnhancerSet­Item­Async­Core
Open sandboxFocus

NonBlockingCachingBackendEnhancer.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 override Task 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
System.Threading.Tasks.Task

A System.Threading.Tasks.Task.

Overrides
CachingBackendEnhancer.SetItemAsyncCore(String, CacheItem, CancellationToken)