Build caches
Clear the npm, Yarn, pnpm and Composer caches an environment's builds keep between deployments.
Before you start
- You can open the site in Managed Websites. Anyone who can open a site can clear its build caches.
- The site's Deployment mode is Deploys from Git.
- Each environment has its own build caches: choose Production or Staging in the site header first.
Clear the build caches
Clear the caches when a build keeps installing a broken or outdated package.
Open the site's deployments
Go to Managed Websites, choose the site, then Deployments under Code & backups. Build caches is the last row of Deployment options.
Clear the caches
Choose Clear build caches…, check the environment named at the top, then choose Clear build caches.
The caches are empty, and a message reads Build caches cleared with the space freed. The site is not affected: the next build downloads its packages again, so it takes longer once.
The … menu of the Pipeline card has Clear build caches… too. The caches are also trimmed every day, oldest first.
Automate this
Removes what the build servers keep between this site's builds, such as downloaded packages.
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/deployments/build-caches/clear \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"Your assistant calls corestack_deployments_build_caches_clear.
{
"name": "corestack_deployments_build_caches_clear",
"arguments": {
"site_id": 4211
}
}