Skip to main content

New environment flag improves deploy cache use

· One min read

The USE_FRAMEWORK_CACHE and USE_NODE_MODULES_CACHE environment flags were deprecated in favor of USE_BUILD_CACHE. The new flag improves the build time by reusing cache from previous commits in newer deploy previews of the same Pull Request.

What has changed?

The new USE_BUILD_CACHE flag replaces the previously used USE_FRAMEWORK_CACHE and USE_NODE_MODULES_CACHE flags.

To exemplify the improvement, consider the git example below.

master: commit-sha-1
PR 233:
- commit-sha-2
- commit-sha-3

Previously, the build correponding to commit-sha-3 would use commit-sha-1 cache. Now it uses the cache generated for commit-sha-2. In case the commit-sha-2 does not exist, the build would use the commit-sha-1 cache.

What needs to be done?

To use this new improvement, set the USE_BUILD_CACHE flag to true in the vtex.env file of your FastStore project.