Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Periodic Cleanup of Cache Directories #1

Open
shartte opened this issue May 13, 2024 · 1 comment
Open

Implement Periodic Cleanup of Cache Directories #1

shartte opened this issue May 13, 2024 · 1 comment

Comments

@shartte
Copy link
Collaborator

shartte commented May 13, 2024

The NFRT cache directories should be periodically cleaned up:

  • Intermediate Results
  • Downloaded Assets
  • Old Work Directories

Investigate Gradles own rules for cleaning the caches.

@lukebemish
Copy link
Contributor

lukebemish commented Aug 13, 2024

From https://docs.gradle.org/current/userguide/directory_layout.html, gradle cleans up the cache whenever the gradle daemon shuts down, or in the foreground after a build if using --no-daemon; basically, it happens after any work has been done so it doesn't slow down the rest of the build. It's also further limited to running once per 24 hours. Files that can be recreated locally are discarded after 7 days without being accessed, files that have to be downloaded last 30 days after last being accessed. For NFRT, the "can recreate locally" ones are expensive enough they might make more sense to go in the 30 days bucket too. This is all configurable from a gradle init script. Note that this is all linked to cache folders used by a specific gradle version -- gradle doesn't clean stuff only used by a newer/older version and doesn't clean any third-party caches that happen to be in the same place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants