Package org.gradle.work

## Annotation Type DisableCachingByDefault

-     @Incubating
      @Documented
      @Retention(RUNTIME)
      @Target(TYPE)
      public @interface 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 `TaskOutputs.cacheIf(String, Spec)` or disabled via `TaskOutputs.doNotCacheIf(String, Spec)`. Using these APIs takes precedence over the presence (or absence) of `@DisableCachingByDefault`.

  Since:
    7.0
  See Also:
    `CacheableTask`, `CacheableTransform`

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element | Description
    --- | --- | ---
    `String` | `because` |

- - ### Element Detail

    - #### because

          String because

      Default:
        ""