diff --git a/common/changes/@microsoft/rush/add-useDirectFileTransfersForBuildCache-to-template_2026-07-20-18-21-19.json b/common/changes/@microsoft/rush/add-useDirectFileTransfersForBuildCache-to-template_2026-07-20-18-21-19.json new file mode 100644 index 0000000000..f7376a0188 --- /dev/null +++ b/common/changes/@microsoft/rush/add-useDirectFileTransfersForBuildCache-to-template_2026-07-20-18-21-19.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Add `useDirectFileTransfersForBuildCache` to the `experiments.json` `rush init` template.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/libraries/rush-lib/assets/rush-init/common/config/rush/experiments.json b/libraries/rush-lib/assets/rush-init/common/config/rush/experiments.json index b5b8d5797a..1bead4b105 100644 --- a/libraries/rush-lib/assets/rush-init/common/config/rush/experiments.json +++ b/libraries/rush-lib/assets/rush-init/common/config/rush/experiments.json @@ -132,5 +132,14 @@ * exist in the Rush configuration, or if change files target a project that belongs to a lockstepped * version policy but is not the policy's main project. */ - /*[LINE "HYPOTHETICAL"]*/ "strictChangefileValidation": true + /*[LINE "HYPOTHETICAL"]*/ "strictChangefileValidation": true, + + /** + * If true, the build cache will use file-based APIs to transfer cache entries to and from cloud storage. + * This avoids loading the entire cache entry into memory, which can prevent out-of-memory errors for large + * build outputs and allow cache entries to exceed the limit of a single Buffer. The cloud cache provider plugin + * must implement the optional file-based methods for this to take effect; otherwise it falls back to the + * buffer-based approach. + */ + /*[LINE "HYPOTHETICAL"]*/ "useDirectFileTransfersForBuildCache": true }