Cache maintenance

The operation is performed per pipeline – it is not possible to clear caches of the entire workspace at once.

Checking consumed space

You can check the volume of consumed space for each project and pipeline in the workspace billing settings by switching to the Usage tab, or directly at https://app.buddy.works/YOUR_WORKSPACE/payments/usage:

Image loading...Cache usage in workspace billing

Manual purge

You can clear the pipeline cache in a few different ways:

  1. By clicking the Clear cache option from the pipeline's dropdown menu:

Image loading...Clear cache in pipeline options

  1. By checking the flag 'Clear cache before running' when running the pipeline manually.

  2. By using /[name] clear run slash command when running the pipeline from Slack.

  3. By using the --clear-cache parameter when running the pipeline with a commit command.

Automatic purge

To automatically purge the cache on every pipeline run, check the flag 'Erase filesystem, Docker layers & cached container paths on run' in the pipeline's settings.

Warning
This option is NOT recommended as all dependencies, artifacts, and Docker images need to be downloaded and/or generated from scratch on every pipeline run, which can drastically extend the runtime.

Clear Cache action

Another method is using the Clear Cache action in the pipeline. Here you can specify what exactly should be purged:

  • Cached Docker layers
  • Pipeline filesystem (cached dependencies, repository files)
  • Cache of attached services
  • Additional cache in build actions used to store files outside pipeline filesystem.

You can add the action to any place in the pipeline and also define when the action should run using the trigger conditions. For instance, you can choose to purge the cache only on changes to the package-lock.json file, which is useful when you want to rebuild the application from scratch and ensure that all dependencies are included:

Image loading...Clear cache action in pipeline

Last modified on Sep 23, 2024