# BuildCacheServiceFactory

interface BuildCacheServiceFactory<T : BuildCache?>(source)

Factory interface to be provided by build cache service implementations.

To be able to use a `BuildCacheService`, the factory that implements this interface and the configuration type (BuildCache) must be registered with the org.gradle.caching.configuration.BuildCacheConfiguration.

In settings.gradle:

        buildCache {
            // Register custom build cache implementation
            registerBuildCacheService(CustomBuildCache, CustomBuildCacheFactory)

            remote(CustomBuildCache) {
                // configure custom build cache.
            }
        }

Content copied to clipboard

#### Since

3.5

#### Parameters

<T>

the type of build cache configuration this factory can handle.

## Types

Describer
Link copied to clipboard
interface Describer
Builder-style object that allows build cache service factories to describe the cache service.

## Functions

createBuildCacheService
Link copied to clipboard
abstract fun createBuildCacheService(configuration: T, describer: BuildCacheServiceFactory.Describer): BuildCacheService
Creates a build cache service from the given configuration.