Introduce top-down action caching in Bazel. The top-down cache may be provided by a Bazel module.
The cache works by first computing a _transitive_ cache key for the action, known as a sketch. It composes the action keys for all dependent actions and all transitive source file digest hashes.
This feature is not currently wired up for use - consider it extremely experimental at this point.
RELNOTES: None
PiperOrigin-RevId: 260973078
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
index aa70340..c8d0ba8 100644
--- a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
+++ b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
@@ -628,6 +628,7 @@
.setEnabled(options.useActionCache)
.setVerboseExplanations(options.verboseExplanations)
.build()),
+ env.getTopDownActionCache(),
request.getPackageCacheOptions().checkOutputFiles
? modifiedOutputFiles
: ModifiedFileSet.NOTHING_MODIFIED,