gradle
8.2

# DisableCachingByDefault

@Documented
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = [ElementType.TYPE])
annotation class DisableCachingByDefault

Attached to a task or artifact transform type to indicate that task output caching should be disabled by default for work of this type. Not all work benefits from caching: for example tasks that only copy content around on disk rarely do. This annotation allows clearly stating that work does not benefit from caching. It also allows attaching an explanation about why a certain work unit is not made cacheable.

Caching for individual task instances can be enabled and disabled via cacheIf or disabled via doNotCacheIf. Using these APIs takes precedence over the presence (or absence) of `@DisableCachingByDefault`.

#### See also

CacheableTask
CacheableTransform

## Functions

annotationType
Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
because
Link copied to clipboard
abstract fun because(): String
equals
Link copied to clipboard
abstract fun equals(p: Any): Boolean
hashCode
Link copied to clipboard
abstract fun hashCode(): Int
toString
Link copied to clipboard
abstract fun toString(): String