The Gradle configuration cache, available starting with Gradle 6.6, not to be confused with the Gradle build cache, is a feature that significantly improves build performance by caching the result of the configuration phase and reusing this for subsequent builds.
It is conceptually similar to the build cache, but caches different information. The build cache takes care of caching the outputs and intermediate files of the build, such as task outputs or artifact transform outputs. The configuration cache takes care of caching the build configuration for a particular set of tasks. In other words, the configuration cache caches the output of the configuration phase, and the build cache caches the outputs of the execution phase.
The configuration cache can be enabled from the command line:
❯ gradle --configuration-cache build
It can also be enabled persistently in a gradle.properties file that you can check into source control:
org.gradle.unsafe.configuration-cache=true
If it is enabled in a gradle.properties file, it can be disabled on the command line for one build invocation:
❯ gradle --no-configuration-cache build
See the official documentation for more command line and gradle.properties options:
https://docs.gradle.org/nightly/userguide/configuration_cache.html