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

Method GetItemAsync

GetItemAsync(String, Boolean, CancellationToken)

Asynchronously gets a cache item given its key.

public Task<CacheValue> GetItemAsync([Required] string key, bool includeDependencies = true, CancellationToken cancellationToken = null)
Type Name Description
String key

The cache item.

Boolean includeDependencies

true if the Dependencies properties of the resulting CacheValue should be populated, otherwise false.

CancellationToken cancellationToken

A CancellationToken.

Type Description

A Task evaluating to a CacheValue, or evaluating to null if there is no item in cache of the given key.