Skip to content

Commit 7082f17

Browse files
author
Luca Bianconi
committed
docs: describe new configuration variables
1 parent 0710afa commit 7082f17

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Diff for: commands/compile/compile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func maybePurgeBuildCache() {
291291
}
292292
inventory.Store.Set("build_cache.compilation_count_since_last_purge", 0)
293293

294-
cacheTTL := configuration.Settings.GetDuration("build_cache.ttl")
294+
cacheTTL := configuration.Settings.GetDuration("build_cache.ttl").Abs()
295295
buildcache.Purge(paths.TempDir().Join("arduino", "cores"), cacheTTL)
296296
buildcache.Purge(paths.TempDir().Join("arduino", "sketches"), cacheTTL)
297297
}

Diff for: docs/configuration.md

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
to the sketch folder. This is the equivalent of using the [`--export-binaries`][arduino-cli compile options] flag.
3434
- `updater` - configuration options related to Arduino CLI updates
3535
- `enable_notification` - set to `false` to disable notifications of new Arduino CLI releases, defaults to `true`
36+
- `build_cache` configuration options related to the compilation cache
37+
- `compilations_before_purge` - interval, in number of compilations, at which the cache is purged, defaults to `10`.
38+
When `0` the cache is never purged.
39+
- `ttl` - cache expiration time of build folders. If the cache is hit by a compilation the corresponding build files
40+
lifetime is renewed. The value format must be a valid input for
41+
[time.ParseDuration()](https://pkg.go.dev/time#ParseDuration), defaults to `720h` (30 days).
3642

3743
## Configuration methods
3844

0 commit comments

Comments
 (0)