[GRADLE-2267] Ability to cleanse the current dependency cache periodically Created: 01/May/12  Updated: 03/Jan/17  Resolved: 03/Jan/17

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: None

Type: New Feature
Reporter: Luke Daley Assignee: Unassigned
Resolution: Duplicate Votes: 24


Given that the dependency cache is opaque, there is no good way for the user to trim it. We should provide a convenient way for users to do this periodically (probably ad hoc as well, but I'll leave that out for now).

For periodic cleansing, I think the most common type of operation would be to want to remove things that have not been "accessed" in a certain time frames. e.g. delete everything that has not been used in 1 month.

Comment by Luke Daley [ 04/May/12 ]

Another option would be to provide a kind of API that allows the user to walk the cache and prune based on their own logic.

Comment by Jochen Hinrichsen [ 13/Feb/14 ]

Another option, especially when gradle is run in a CI environment, is to offer a commandline switch --cache-dir=project which will relocate the cache from the user's home directory to a project/ job local cache (default: --project-cache-dir). This option, combined with a fresh checkout each and every time, should be a safe way for both dependency resolution and housekeeping.

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 03/Jan/17 ]

Closing as duplicate. The work will be tracked via https://github.com/gradle/gradle/issues/1085.

Generated at Wed Jun 30 12:17:17 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.