Skip to content

Make periodic cache cleanup retention times configurable #7018

@wszeboreq

Description

@wszeboreq

Expected Behavior

Periodic Gradle cache cleanup was implemented as #1085. Comment #1085 (comment) summarizes the implemented strategy. It would be great to have various hardcoded cleanup algorithm parameters configurable, at least the 7/30 days retention times. This would give the additional flexibility and allow tuning the periodic cache cleanup to fit various possible scenarios and environments.

Current Behavior

Currently the 7/30 days retention times described in the mentioned comment are not configurable.

Context

Our projects use some dependency artifacts having significant disk sizes (e.g. 1 GB). Practically each day we have a new version of majority of these dependencies. This leads to '.gradle/caches/modules-2/files-2.1' grow bigger and bigger each day, leading to free disk space problems on the build servers. 30 days of cache retention time in this scenario may lead to requirement of 30 GB free cache disk space for each bigger dependency.

Your Environment

------------------------------------------------------------
Gradle 4.10.1
------------------------------------------------------------

Build time:   2018-09-12 11:33:27 UTC
Revision:     76c9179ea9bddc32810f9125ad97c3315c544919

Kotlin DSL:   1.0-rc-6
Kotlin:       1.2.61
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_151 (Oracle Corporation 25.151-b12)
OS:           Windows 10 10.0 amd64

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions