Training
Learning path
AZ-204: Implement caching for solutions - Training
Learn how to improve the performance and scalability of your applications by integrating Azure Cache for Redis and Azure Content Delivery Network in to your solution.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
All asset caches are configured through the X_VCPKG_ASSET_SOURCES
environment variable. The value
of X_VCPKG_ASSET_SOURCES
follows a specific configuration
syntax.
In this tutorial you'll learn how to:
You can use the Azure Blob Storage backend "x-azurl
", to store
assets. Alternatively, you can use filesystem directories to store
your download assets, including network locations. To do so, you need to use the
file://
protocol in your asset cache URL.
In this tutorial, you'll create a local asset cache location to store downloaded artifacts. If you have an Azure DevOps Blob Storage you want to use instead, replace the URL and provide a SAS token as the second parameter in the configuration string.
mkdir D:\vcpkg\asset-cache
mkdir /home/vcpkg/asset-cache
Next set the value of X_VCPKG_ASSET_SOURCES
as follows:
$env:X_VCPKG_ASSET_SOURCES="clear;x-azurl,file://D:/vcpkg/asset-cache,,readwrite"
Note
Setting environment variables in this manner only affects the current terminal session. To make these changes permanent across all sessions, set them through the Windows System Environment Variables panel.
set "X_VCPKG_ASSET_SOURCES=clear;x-azurl,file://D:/vcpkg/asset-cache,,readwrite"
Note
Setting environment variables in this manner only affects the current terminal session. To make these changes permanent across all sessions, set them through the Windows System Environment Variables panel.
This X_VCPKG_ASSET_SOURCES
configuration adds the following source strings:
clear
, disables any previously configured asset cachex-azurl,file://C:/vcpkg/asset-cache,,readwrite
, sets a filesystem asset cache, located in
D:\vcpkg\asset-cache
, with read-write permissions.export X_VCPKG_ASSET_SOURCES="clear;x-azurl,file:///home/vcpkg/asset-cache,,readwrite"
Note
Setting environment variables using the export
command only
affects the current shell session. To make this change permanent across
sessions, add the export
command to your shell's profile
script (e.g., ~/.bashrc
or ~/.zshrc
).
This X_VCPKG_ASSET_SOURCES
configuration adds the following source strings:
clear
, disables any previously configured asset cachex-azurl,file:///home/vcpkg/asset-cache,,readwrite
, sets a filesystem asset cache, located in
home/vcpkg/asset-cache
, with read-write permissions.Here are other tasks to try next:
vcpkg feedback
vcpkg is an open source project. Select a link to provide feedback:
Training
Learning path
AZ-204: Implement caching for solutions - Training
Learn how to improve the performance and scalability of your applications by integrating Azure Cache for Redis and Azure Content Delivery Network in to your solution.