As documented here, there are two flags for specifying a cache directory where Bazel can check before downloading a file from the net: --repository_cache
and --distdir
What's the difference between them?
Both the repository cache and the distribution files directory have more extensive prose documentation in the user guide. The short version is the repository cache is a content-addressable cache used internally by Bazel. The distribution files directory is keyed by archive file name and expected to be completely user-provided.