Open
Description
The current implementation from #12634 exposes a large number of low-level config options for configuring how automatic gc works. I'm uncomfortable having so many low-level options, and I would like to slim it down if possible. However, I'm uncertain what use cases would dictate what the user would actually want to change.
I think gc.auto.frequency
needs to stay, but the rest should probably change? One idea I had was to separate based on "things that can be recreated" from "things that require downloading", which is essentially how the 1 month/3 month distinction happens.
# Example config.toml file.
# This table defines the behavior for automatic garbage collection.
[gc.auto]
# The maximum frequency that automatic garbage collection happens.
# Can be "never" to disable automatic-gc, or "always" to run on every command.
frequency = "1 day"
# Anything older than this duration will be deleted in the source cache.
max-src-age = "1 month"
# Anything older than this duration will be deleted in the compressed crate cache.
max-crate-age = "3 months"
# Any index older than this duration will be deleted from the index cache.
max-index-age = "3 months"
# Any git checkout older than this duration will be deleted from the checkout cache.
max-git-co-age = "1 month"
# Any git clone older than this duration will be deleted from the git cache.
max-git-db-age = "3 months"