remote: introduce --disk_cache_flag
Consolidate the --experimental_local_disk_cache and --experimental_local_disk_cache_path
flags into a single --disk_cache= flag. Also, create the cache directory
if it doesn't exist.
RELNOTES: We replaced the --experimental_local_disk_cache and
--experimental_local_disk_cache_path flags into a single --disk_cache
flag. Additionally, Bazel now tries to create the disk cache directory
if it doesn't exist.
Closes #5119.
PiperOrigin-RevId: 195070550
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java
index dd4f5a0..e3b303d 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java
@@ -175,25 +175,17 @@
)
public boolean experimentalRemoteSpawnCache;
- // TODO(davido): Find a better place for this and the next option.
@Option(
- name = "experimental_local_disk_cache",
- defaultValue = "false",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
- help = "Whether to use the experimental local disk cache."
- )
- public boolean experimentalLocalDiskCache;
-
- @Option(
- name = "experimental_local_disk_cache_path",
+ name = "disk_cache",
defaultValue = "null",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
converter = OptionsUtils.PathFragmentConverter.class,
- help = "A file path to a local disk cache."
+ help =
+ "A path to a directory where Bazel can read and write actions and action outputs. "
+ + "If the directory does not exist, it will be created."
)
- public PathFragment experimentalLocalDiskCachePath;
+ public PathFragment diskCache;
@Option(
name = "experimental_guard_against_concurrent_changes",