Aloha!
Our team is considering enabling --disk_cache for developers via .bazelrc. While we were reading the documentation, we saw this:
Since Bazel does not garbage-collect the directory, you might want to automate a periodic cleanup of this directory.
--disk_cache is enabled, and a user is attempting to build or test broken code repeatedly?macOS Catalina 10.15.4 (19E287)
bazel info release?>_ bazel info release
release 3.0.0
We haven't seen anything else related to this on GitHub issues or elsewhere.
Aloha! Quick ping on this!
This is not a feature request or bug report, but we were wondering if someone could help answer the above concerns that we had.
Thanks!
The recommendation is based on simply reducing the size of on-disk cache.
You won't have cache corruption (if you do, that is a bug):
--remote_upload_local_results is enabled (which is enabled by default).However, this is a known issue that with --remote_download_minimal, the remote cache is expected to not evict outputs during a build. https://github.com/bazelbuild/bazel/issues/8250
Based on your use case, I think --disk_cache is safe to go.
Closing. Feel free to re-open if this is still an issue.