commit | 02838a1b2aa2f6d03980536ab2ac6840c3c98e84 | [log] [tgz] |
---|---|---|
author | larsrc <larsrc@google.com> | Tue Nov 10 03:46:53 2020 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Nov 10 03:48:04 2020 -0800 |
tree | ced1b00805885a2c52a8fe39ccb90e6007080f35 | |
parent | 780e27df4df6c098b4732750ad5464b97c25744d [diff] [blame] |
Avoid the spawn cache if executing dynamically. Fixes bazelbuild#12364 (caused by https://github.com/bazelbuild/bazel/commit/25e58ffc529b9cf4e1d0dccbbad27f40f092f1ec) based on Ulf's approach, but avoiding secretly disabling some potential caches that should not be disabled. RELNOTES: n/a PiperOrigin-RevId: 341588598
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java index e72c04e..51a1d65 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java +++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
@@ -342,4 +342,9 @@ private static boolean useDiskCache(RemoteOptions options) { return options.diskCache != null && !options.diskCache.isEmpty(); } + + @Override + public boolean usefulInDynamicExecution() { + return false; + } }