# Interface CacheConfigurations

@Incubating public interface CacheConfigurations
Configures caches stored in the user home directory. Note that these values can be read at any time, but can only be configured via an init script, ideally stored in the init.d directory in the user home directory.

Since:
  8.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `buildCache(Action<? super CacheResourceConfiguration> cacheConfiguration)`
  Configures caching for entries in the local build cache.
  `void`
  `createdResources(Action<? super CacheResourceConfiguration> cacheConfiguration)`
  Configures caching for resources that are created by Gradle during the course of a build.
  `void`
  `daemonLogs(Action<? super CacheResourceConfiguration> cacheConfiguration)`
  Configures retention time for daemon logs.
  `void`
  `downloadedResources(Action<? super CacheResourceConfiguration> cacheConfiguration)`
  Configures caching for resources that are downloaded during Gradle builds.
  `CacheResourceConfiguration`
  `getBuildCache()`
  Returns the cache configuration for local build cache.
  `Property<Cleanup>`
  `getCleanup()`
  Returns the cache cleanup settings that apply to all caches.
  `CacheResourceConfiguration`
  `getCreatedResources()`
  Returns the cache configuration for created resources.
  `CacheResourceConfiguration`
  `getDaemonLogs()`
  Returns the daemon log settings.
  `CacheResourceConfiguration`
  `getDownloadedResources()`
  Returns the cache configuration for downloaded resources.
  `Property<MarkingStrategy>`
  `getMarkingStrategy()`
  Configures how caches should be marked, if at all.
  `CacheResourceConfiguration`
  `getReleasedWrappers()`
  Returns the cache configuration for wrapper distributions that are released Gradle versions.
  `CacheResourceConfiguration`
  `getSnapshotWrappers()`
  Returns the cache configuration for wrapper distributions that are released Gradle versions.
  `void`
  `releasedWrappers(Action<? super CacheResourceConfiguration> cacheConfiguration)`
  Configures caching for wrapper distributions that are released Gradle versions.
  `void`
  `snapshotWrappers(Action<? super CacheResourceConfiguration> cacheConfiguration)`
  Configures caching for wrapper distributions that are snapshot Gradle versions.

- ## Method Details

  - ### releasedWrappers

    void releasedWrappers(Action<? super CacheResourceConfiguration> cacheConfiguration)
    Configures caching for wrapper distributions that are released Gradle versions. By default, released distributions are removed after 30 days of not being used.
    Since:
      8.0

  - ### getReleasedWrappers

    CacheResourceConfiguration getReleasedWrappers()
    Returns the cache configuration for wrapper distributions that are released Gradle versions.
    Since:
      8.0

  - ### snapshotWrappers

    void snapshotWrappers(Action<? super CacheResourceConfiguration> cacheConfiguration)
    Configures caching for wrapper distributions that are snapshot Gradle versions. By default, snapshot distributions are removed after 7 days of not being used.
    Since:
      8.0

  - ### getSnapshotWrappers

    CacheResourceConfiguration getSnapshotWrappers()
    Returns the cache configuration for wrapper distributions that are released Gradle versions.
    Since:
      8.0

  - ### downloadedResources

    void downloadedResources(Action<? super CacheResourceConfiguration> cacheConfiguration)
    Configures caching for resources that are downloaded during Gradle builds. By default, downloaded resources are removed after 30 days of not being used.
    Since:
      8.0

  - ### getDownloadedResources

    CacheResourceConfiguration getDownloadedResources()
    Returns the cache configuration for downloaded resources.
    Since:
      8.0

  - ### createdResources

    void createdResources(Action<? super CacheResourceConfiguration> cacheConfiguration)
    Configures caching for resources that are created by Gradle during the course of a build. By default, created resources are removed after 7 days of not being used.
    Since:
      8.0

  - ### getCreatedResources

    CacheResourceConfiguration getCreatedResources()
    Returns the cache configuration for created resources.
    Since:
      8.0

  - ### buildCache

    void buildCache(Action<? super CacheResourceConfiguration> cacheConfiguration)
    Configures caching for entries in the local build cache. By default, build cache entries are removed after 7 days of not being used.
    Since:
      8.8

  - ### getBuildCache

    CacheResourceConfiguration getBuildCache()
    Returns the cache configuration for local build cache.
    Since:
      8.8

  - ### getCleanup

    Property<Cleanup> getCleanup()
    Returns the cache cleanup settings that apply to all caches.
    Since:
      8.0

  - ### getMarkingStrategy

    Property<MarkingStrategy> getMarkingStrategy()
    Configures how caches should be marked, if at all.

    By default, caches are marked using `MarkingStrategy.CACHEDIR_TAG`.

    Since:
      8.1

  - ### getDaemonLogs

    @Incubating CacheResourceConfiguration getDaemonLogs()
    Returns the daemon log settings.
    Since:
      9.4.0

  - ### daemonLogs

    @Incubating void daemonLogs(Action<? super CacheResourceConfiguration> cacheConfiguration)
    Configures retention time for daemon logs.

    By default, daemon logs are removed after 14 days of not being used."

    Since:
      9.4.0