Open sandboxFocus

Method ContainsItemAsync

ContainsItemAsync(string, CancellationToken)

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

Declaration
public ValueTask<bool> ContainsItemAsync(string key, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string key

The key of the cache item.

CancellationToken cancellationToken

A CancellationToken.

Returns
Type Description
ValueTask<bool>

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