DevOps / Gradle8 Interview Questions
What is the difference between the build cache and the configuration cache?
Both are caches, but they cache different phases of the build and solve different problems.
| Build Cache | Configuration Cache |
| Caches task execution outputs. | Caches the result of the configuration phase (the task graph itself). |
| Skips re-running a task's action if inputs match a stored entry, locally or remotely. | Skips re-running build scripts entirely if nothing configuration-relevant changed. |
| Can be shared across machines via a remote cache server. | Local to the machine/checkout by default. |
| Benefits any build, including a completely fresh checkout with matching inputs. | Benefits repeated builds on the same machine/checkout with unchanged build logic. |
They're complementary, not competing: a build with both enabled can skip configuration entirely (via the configuration cache) and then, for whatever tasks do need to run, potentially skip execution too by pulling from the build cache — the two together are what gets a large project's incremental build down to near-instant when nothing meaningful changed.
More Related questions...
