# BuildCacheConfiguration

API Documentation: | `BuildCacheConfiguration`

Configuration for the build cache for an entire Gradle build.

### Properties

Property | Description
`local` | The local directory cache configuration.
`remote` | The remote cache configuration.

### Methods

Method | Description
`local(type)` | Deprecated Configures the local cache with the given type.
`local(type, configuration)` | Deprecated Configures the local cache with the given type.
`local(configuration)` | Executes the given action against the local configuration.
`remote(type)` | Configures a remote cache with the given type.
`remote(type, configuration)` | Configures a remote cache with the given type.
`remote(configuration)` | Executes the given action against the currently configured remote cache.

### Script blocks

No script blocks

### Property details

#### `DirectoryBuildCache` `local` (read-only)

The local directory cache configuration.

#### `BuildCache` `remote` (read-only)

The remote cache configuration.

### Method details

#### `T` `local`(``Class`<`T`>` type)

Note: This method is deprecated and will be removed in the next major version of Gradle.

Configures the local cache with the given type.

Note: using any type except `DirectoryBuildCache` is invalid.

#### `T` `local`(``Class`<`T`>` type, ``Action`<? super `T`>` configuration)

Note: This method is deprecated and will be removed in the next major version of Gradle.

Configures the local cache with the given type.

Note: using any type except `DirectoryBuildCache` is invalid.

#### `void` `local`(``Action`<? super `DirectoryBuildCache`>` configuration)

Executes the given action against the local configuration.

#### `T` `remote`(``Class`<`T`>` type)

Configures a remote cache with the given type.

If a remote build cache has already been configured with a different type, this method replaces it.

Storing ("push") in the remote build cache is disabled by default.

#### `T` `remote`(``Class`<`T`>` type, ``Action`<? super `T`>` configuration)

Configures a remote cache with the given type.

If a remote build cache has already been configured with a different type, this method replaces it.

If a remote build cache has already been configured with the same, this method configures it.

Storing ("push") in the remote build cache is disabled by default.

#### `void` `remote`(``Action`<? super `BuildCache`>` configuration)

Executes the given action against the currently configured remote cache.