# BuildCacheConfiguration

interface BuildCacheConfiguration

Configuration for the build cache for an entire Gradle build.

#### Since

3.5

## Functions

getLocal
Link copied to clipboard
abstract fun getLocal(): DirectoryBuildCache
Returns the local directory cache configuration.
getRemote
Link copied to clipboard
@Nullable
abstract fun getRemote(): BuildCache
Returns the remote cache configuration.
local
Link copied to clipboard
abstract fun local(configuration: Action<in DirectoryBuildCache>)
Executes the given action against the local configuration.
registerBuildCacheService
Link copied to clipboard
abstract fun <T : BuildCache?> registerBuildCacheService(configurationType: Class<T>, buildCacheServiceFactoryType: Class<out BuildCacheServiceFactory<in T>>)
Registers a custom build cache type.
registerBuildCacheService
Link copied to clipboard
inline fun <T : BuildCache> BuildCacheConfiguration. registerBuildCacheService(buildCacheServiceFactoryType: KClass<out BuildCacheServiceFactory<in T>>)

Registers a custom build cache type.

inline fun <T : BuildCache> BuildCacheConfiguration. registerBuildCacheService(configurationType: KClass<T>, buildCacheServiceFactoryType: KClass<out BuildCacheServiceFactory<in T>>)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.caching.configuration.BuildCacheConfiguration.registerBuildCacheService.

remote
Link copied to clipboard
abstract fun <T : BuildCache?> remote(type: Class<T>): T
abstract fun <T : BuildCache?> remote(type: Class<T>, configuration: Action<in T>): T
Configures a remote cache with the given type.
abstract fun remote(configuration: Action<in BuildCache>)
Executes the given action against the currently configured remote cache.
remote
Link copied to clipboard
inline fun <T : BuildCache> BuildCacheConfiguration. remote(): T
inline fun <T : BuildCache> BuildCacheConfiguration. remote(noinline configuration: T.() -> Unit): T

Configures a remote cache with the given type.

inline fun <T : BuildCache> BuildCacheConfiguration. remote(type: KClass<T>): T
inline fun <T : BuildCache> BuildCacheConfiguration. remote(type: KClass<T>, configuration: Action<in T>): T

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.caching.configuration.BuildCacheConfiguration.remote.