PostSharpAPI ReferencePost­Sharp.​Patterns.​Caching.​BackendsTwo­Layer­Caching­Backend­EnhancerContains­Item­Async­Core
Open sandboxFocus

TwoLayerCachingBackendEnhancer.ContainsItemAsyncCore Method

ContainsItemAsyncCore(String, CancellationToken)

Asynchronously determines whether the cache contains an item of a given key. 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.

Declaration
protected override Task<bool> ContainsItemAsyncCore(string key, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String key

The key of the cache item.

System.Threading.CancellationToken cancellationToken

A System.Threading.CancellationToken.

Returns
Type Description
Task<Boolean>

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

Overrides
CachingBackendEnhancer.ContainsItemAsyncCore(String, CancellationToken)