- Edit
BAZEL_BIN_PATHin the script to match your setup - Add
build --disk_cache=~/.cache/bazel/disk_cacheto your.bazelrc. Edit the path to your preferences and the variable value accordingly. - Edit the value of
BAZEL_DISK_CACHE_MAX_AGEto match your preferences.
- Higher values means more cache hits over time
- Lower values means less disk-space and less cleanup time and CPU load
- Finally source the scriupt from your shell profile