1. Resources
  2. /
  3. Plugins
  4. /
  5. nscache-buildkite-plugin

NSCloud Cache Plugin for Buildkite

Mounts cache volumes for Buildkite pipelines running on Namespace Cloud.

Example

Add the following to your pipeline.yml:

steps:
  - command: npm install
    plugins:
      - namespacelabs/nscache#v0.1
    agents:
      nsc-cache-tag: my-repo/my-step

How it works

When running Buildkite agents on Namespace platfrom you can specify additional agent tags modifying the configuration of the VM the agent runs on. nsc-cache-tag enables mounting a cache volume for this pipeline step. All steps having this tag will share cache volume contents (best effort).

The cache tag property enables mounting of a single volume under /cache/ path into the agent. The nscache plugin links subdirectories of the cache volume into the paths specified in the configuration. For example, if paths: node_modules the plugin will link ./node_modules to /cache/nscache/node_modules.

You don’t specify paths the plugin will automatically detect project platform and use the cache for directories used for caches by the platform. Currently supported:

  • NodeJS (if package.json is present in the repo root): ./node_modules, ~/.npm, ~/.cache/yarn, ~/.pnpm-store.
  • Go (if go.mod is present in the repo root): ~/go/pkg/mod, ~/.cache/go-build.

Advanced example

steps:
  - command: |
      # Install a package using global NPM cache:
      npm i -g license

      # Read current cache content.
      if ! cat my-cache/LICENSE
      then
        # Save the license to cache if not present.
        npx license --raw MIT > my-cache/LICENSE
      fi

    plugins:
      - namespacelabs/nscache#v0.1:
          paths:
            - my-cache # relative to the working dir
            - ~/.npm # absolute path
    agents:
      nsc-cache-tag: my-repo/my-step
      nsc-cache-size: 2g

Configuration

paths (optional, string or list of strings)

The paths to enable caching for. The paths may be absolute, relative (to working directory) or home-relative (~/...).

If not specified, automatic platform detection is used (see above).

The plugins listed on this webpage are provided for informational purposes only. They have not undergone any formal security review or assessment. While we strive to provide useful resources, we cannot guarantee the safety, reliability, or integrity of these plugins. Users are strongly advised to conduct their own security evaluations before downloading, installing, or using any plugin. By using these plugins, you acknowledge and accept any risks associated with their use. We disclaim any liability for any harm or damages arising from the use of the plugins listed.

Start turning complexity into an advantage

Create an account to get started with a 30-day free trial. No credit card required.

Buildkite Pipelines

Platform

  1. Pipelines
  2. Pipeline templates
  3. Public pipelines
  4. Test Engine
  5. Package Registries
  6. Mobile Delivery Cloud
  7. Pricing

Hosting options

  1. Self-hosted agents
  2. Mac hosted agents
  3. Linux hosted agents

Resources

  1. Docs
  2. Blog
  3. Changelog
  4. Webinars
  5. Plugins
  6. Case studies
  7. Events
  8. Migration Services
  9. Comparisons

Company

  1. About
  2. Careers
  3. Press
  4. Brand assets
  5. Contact

Solutions

  1. Replace Jenkins
  2. Workflows for AI/ML
  3. Testing at scale
  4. Monorepo mojo
  5. Bazel orchestration

Legal

  1. Terms of Service
  2. Acceptable Use Policy
  3. Privacy Policy
  4. Subprocessors
  5. Service Level Agreement

Support

  1. System status
  2. Forum
© Buildkite Pty Ltd 2025