logo

nsc bazel cache setup

Set up a remote Bazel cache.

Namespace provides high-performance Bazel caching with very low network latency between runners and the cache storage. This allows your Bazel workflows to reuse build artifacts across runs, irrespective of your chosen granularity, significantly reducing build times. bazel cache setup sets up a remote Bazel cache and generates a bazelrc to use it.

This is a preview feature. If you want to try Bazel caching, reach out to us and we can enable it for you.

Get in touch

Usage

nsc bazel cache setup [--bazelrc <target bazelrc path>]

Example

The following example creates a remote Bazel cache and uses it during a build invocation.

$ nsc bazel cache setup --bazelrc=/tmp/bazel-cache.bazelrc

Next, let's use the generated configuration

$ bazel --bazelrc=yourown.bazelrc --bazelrc=/tmp/bazel-cache.bazelrc build //...

Options

--bazelrc

If specified, write the bazelrc to this path.