For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

setBuildCacheEnabled

open fun setBuildCacheEnabled(buildCacheEnabled: Boolean)(source)

Enables/disables the build cache.

Calling this on the start parameter of a running build is deprecated: use the org.gradle.caching Gradle property instead. It is not annotated as deprecated because it remains the only way to configure the build a GradleBuild task runs.

Since

3.5