api / org.gradle.api.tasks / CacheableTask

CacheableTask

@Target([AnnotationTarget.CLASS, AnnotationTarget.FILE]) class CacheableTask

Attached to a task type to indicate that task output caching should be enabled by default for tasks of this type.

Only tasks that produce reproducible and relocatable output should be marked with CacheableTask.

Caching for individual task instances can be disabled via TaskOutputs#cacheIf(String, Spec) or TaskOutputs#doNotCacheIf(String, Spec).

Since
3.0

Constructors

<init>

CacheableTask()

Attached to a task type to indicate that task output caching should be enabled by default for tasks of this type.

Only tasks that produce reproducible and relocatable output should be marked with CacheableTask.

Caching for individual task instances can be disabled via TaskOutputs#cacheIf(String, Spec) or TaskOutputs#doNotCacheIf(String, Spec).