...
1# Bazel Remote Cache Config Generator
2
3`bzl-cache-rc-gen` generates a `.bazelrc` based on provided configuration for using the shared Edge remote Bazel cache. This can be used for generating `.bazelrc` files to use on local developer machines or containers / CI builds.
4
5Valid configuration values and descriptions of what they do can be found in `main.go`. They can also be seen by running `bazel run //cmd/tools/bzl-cache-rc-gen -- --help`.
6
7For general configuration recommendations, [see the Bazel remote caching documentation for this repo](https://docs.edge-infra.dev/dev/contributing/bazel/#remote-caching).
8
9
10## Unique Cache Keys
11
12Importantly, `bzl-cache-rc-gen` creates a unique Bazel cache key based on some heuristics that attempt to identify the uniqueness of the machine it is ran on. This is used to ensure our Bazel cache is not poisoned (more information [here](https://forum.buildkite.community/t/any-experience-setting-up-a-shared-remote-build-cache-using-bazel/1119/4)). For example, [this is the script used by Kubernetes](https://github.com/kubernetes/test-infra/blob/master/images/bootstrap/create_bazel_cache_rcs.sh).
View as plain text