api / org.gradle.caching.local / DirectoryBuildCache

DirectoryBuildCache

open class DirectoryBuildCache : AbstractBuildCache

Configuration object for the local directory build cache.

Since
3.5

Constructors

<init>

DirectoryBuildCache()

Configuration object for the local directory build cache.

Functions

getDirectory

open fun getDirectory(): Any

Returns the directory to use to store the build cache.

getRemoveUnusedEntriesAfterDays

open fun getRemoveUnusedEntriesAfterDays(): Int

Returns the number of days after unused entries are garbage collected. Defaults to 7 days.

getTargetSizeInMB

open fun getTargetSizeInMB(): Long

Used to be the target size of the build cache in megabytes, now returns 0.

setDirectory

open fun setDirectory(directory: Any): Unit

Sets the directory to use to store the build cache. The directory is evaluated as per Project.file(Object).

setRemoveUnusedEntriesAfterDays

open fun setRemoveUnusedEntriesAfterDays(removeUnusedEntriesAfterDays: Int): Unit

Sets the number of days after unused entries are garbage collected. Defaults to 7 days. Must be greater than 1.

setTargetSizeInMB

open fun setTargetSizeInMB(targetSizeInMB: Long): Unit

Used to set the target size of the build cache in megabytes, now has no effect.

Inherited Functions

isEnabled

open fun isEnabled(): Boolean

{@inheritDoc}

isPush

open fun isPush(): Boolean

{@inheritDoc}

setEnabled

open fun setEnabled(enabled: Boolean): Unit

{@inheritDoc}

setPush

open fun setPush(push: Boolean): Unit

{@inheritDoc}