ISolutionCacheService.PrefetchContainerAsync 方法

定义

确保将容器内容预提取到本地缓存。

public:
 System::Threading::Tasks::Task<bool> ^ PrefetchContainerAsync(Microsoft::VisualStudio::RpcContracts::Caching::CacheContainerKey ^ containerKey, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<bool> PrefetchContainerAsync (Microsoft.VisualStudio.RpcContracts.Caching.CacheContainerKey containerKey, System.Threading.CancellationToken cancellationToken);
abstract member PrefetchContainerAsync : Microsoft.VisualStudio.RpcContracts.Caching.CacheContainerKey * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function PrefetchContainerAsync (containerKey As CacheContainerKey, cancellationToken As CancellationToken) As Task(Of Boolean)

参数

containerKey
CacheContainerKey

描述容器的缓存容器密钥。

cancellationToken
CancellationToken

要监视的取消标记。

返回

Task<Boolean>

如果在缓存中找不到容器,则任务指示完成预提取,则返回 false。

例外

当调用方没有写入权限时引发。

适用于