You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This renames the gc config table to `[cache]` to help avoid some
confusion, and to set up a namespace for possible expansion in the
future for different kind of cache controls.
Low-level settings are stuffed into the `[cache.global-clean]` table,
but we do not expect to stabilize these at this time. Only the top-level
`cache.auto-clean-frequency` setting is expected to be stabilized.
Closes#14292
Copy file name to clipboardExpand all lines: src/doc/src/reference/unstable.md
+9-6
Original file line number
Diff line number
Diff line change
@@ -1601,7 +1601,7 @@ cargo build -Zgc
1601
1601
Automatic deletion happens on commands that are already doing a significant amount of work,
1602
1602
such as all of the build commands (`cargo build`, `cargo test`, `cargo check`, etc.), and `cargo fetch`.
1603
1603
The deletion happens just after resolution and packages have been downloaded.
1604
-
Automatic deletion is only done once per day (see `gc.auto.frequency` to configure).
1604
+
Automatic deletion is only done once per day (see `cache.auto-clean-frequency` to configure).
1605
1605
Automatic deletion is disabled if cargo is offline such as with `--offline` or `--frozen` to avoid deleting artifacts that may need to be used if you are offline for a long period of time.
1606
1606
1607
1607
#### Automatic gc configuration
@@ -1612,11 +1612,14 @@ The settings available are:
1612
1612
```toml
1613
1613
# Example config.toml file.
1614
1614
1615
-
# This table defines the behavior for automatic garbage collection.
1616
-
[gc.auto]
1617
-
# The maximum frequency that automatic garbage collection happens.
1618
-
# Can be "never" to disable automatic-gc, or "always" to run on every command.
1619
-
frequency = "1 day"
1615
+
# This table defines settings for cargo's caches.
1616
+
[cache]
1617
+
# The maximum frequency that automatic cleaning of the cache happens.
1618
+
# Can be "never" to disable, or "always" to run on every command.
1619
+
auto-clean-frequency = "1 day"
1620
+
1621
+
# Sub-table for defining specific settings for cleaning the global cache.
1622
+
[cache.global-clean]
1620
1623
# Anything older than this duration will be deleted in the source cache.
1621
1624
max-src-age = "1 month"
1622
1625
# Anything older than this duration will be deleted in the compressed crate cache.
0 commit comments