PostSharp6.3/API Reference/Post­Sharp.​Patterns.​Caching.​Implementation Namespace/Caching­Backend Class/Caching­Backend Methods/Caching­Backend.​Get­Item­Async Method

CachingBackend.GetItemAsync Method

Asynchronously gets a cache item given its key.

Namespace:  PostSharp.Patterns.Caching.Implementation
Assembly:  PostSharp.Patterns.Caching (in PostSharp.Patterns.Caching.dll) Version: 6.3.11.0 (6.3.11.0)
Syntax
C#
public Task<CacheValue> GetItemAsync(
	string key,
	bool includeDependencies = true,
	CancellationToken cancellationToken = null
)

Parameters

key
Type: System.String
The cache item.
includeDependencies (Optional)
Type: System.Boolean
true if the Dependencies properties of the resulting CacheValue should be populated, otherwise false.
cancellationToken (Optional)
Type: System.Threading.CancellationToken
A CancellationToken.

Return Value

Type: Task<CacheValue>
A Task evaluating to a CacheValue, or evaluating to null if there is no item in cache of the given key.
See Also