PostSharpAPI ReferencePost­Sharp.​Patterns.​Caching.​ImplementationCaching­BackendContains­Item­Async
Open sandboxFocus

CachingBackend.ContainsItemAsync Method

ContainsItemAsync(String, CancellationToken)

Asynchronously determines whether the cache contains an item of a given key.

Declaration
public Task<bool> ContainsItemAsync([Required] string key, CancellationToken cancellationToken = null)
Parameters
Type Name Description
String key

The key of the cache item.

CancellationToken cancellationToken

A CancellationToken.

Returns
Type Description
Task<Boolean>

A Task that evaluates to true if the cache contains an item whose key is key, otherwise false.