Open sandboxFocus

Method GetItemAsync

GetItemAsync(string, bool, CancellationToken)

Asynchronously gets a cache item given its key.

Declaration
public Task<CacheValue> GetItemAsync(string key, bool includeDependencies = true, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string key

The cache item.

bool includeDependencies

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

CancellationToken cancellationToken

A CancellationToken.

Returns
Type Description
Task<CacheValue>

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