Class DirectoryBuildCache
java.lang.Object
org.gradle.caching.configuration.AbstractBuildCache
org.gradle.caching.local.DirectoryBuildCache
- All Implemented Interfaces:
BuildCache
Configuration object for the local directory build cache.
- Since:
- 3.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the directory to use to store the build cache.intReturns the number of days after unused entries are garbage collected.longDeprecated.voidsetDirectory(Object directory) Sets the directory to use to store the build cache.voidsetRemoveUnusedEntriesAfterDays(int removeUnusedEntriesAfterDays) Sets the number of days after unused entries are garbage collected.voidsetTargetSizeInMB(long targetSizeInMB) Deprecated.UsesetRemoveUnusedEntriesAfterDays(int)instead.Methods inherited from class AbstractBuildCache
isEnabled, isPush, setEnabled, setPush
-
Constructor Details
-
DirectoryBuildCache
public DirectoryBuildCache()
-
-
Method Details
-
getDirectory
Returns the directory to use to store the build cache. -
setDirectory
Sets the directory to use to store the build cache. The directory is evaluated as perProject.file(Object). -
getTargetSizeInMB
Deprecated.UsegetRemoveUnusedEntriesAfterDays()instead.Used to be the target size of the build cache in megabytes, now returns0. -
setTargetSizeInMB
Deprecated.UsesetRemoveUnusedEntriesAfterDays(int)instead.Used to set the target size of the build cache in megabytes, now has no effect. -
getRemoveUnusedEntriesAfterDays
Returns the number of days after unused entries are garbage collected. Defaults to 7 days.- Since:
- 4.6
-
setRemoveUnusedEntriesAfterDays
Sets the number of days after unused entries are garbage collected. Defaults to 7 days. Must be greater than 1.- Since:
- 4.6
-
getRemoveUnusedEntriesAfterDays()instead.