ISolutionCacheService.TryGetItemAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.