ISolutionCacheService.TryGetItemAsync Method

Definition

Tries to retrieve an item from cache that is assigned to a particular key.

public:
 System::Threading::Tasks::Task<bool> ^ TryGetItemAsync(Microsoft::VisualStudio::RpcContracts::Caching::CacheItemKey key, System::IO::Pipelines::PipeWriter ^ writer, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<bool> TryGetItemAsync (Microsoft.VisualStudio.RpcContracts.Caching.CacheItemKey key, System.IO.Pipelines.PipeWriter writer, System.Threading.CancellationToken cancellationToken);
abstract member TryGetItemAsync : Microsoft.VisualStudio.RpcContracts.Caching.CacheItemKey * System.IO.Pipelines.PipeWriter * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function TryGetItemAsync (key As CacheItemKey, writer As PipeWriter, cancellationToken As CancellationToken) As Task(Of Boolean)

Parameters

key
CacheItemKey

Cache item key, that is usualy retrived from an CacheContainer instance.

writer
PipeWriter

Writer to use to stream content.

cancellationToken
CancellationToken

Cancellation token to monitor.

Returns

true if entry is found and data is streamed to writer, false otherwise.

Applies to