File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ func maybePurgeBuildCache() {
291
291
}
292
292
inventory .Store .Set ("build_cache.compilation_count_since_last_purge" , 0 )
293
293
294
- cacheTTL := configuration .Settings .GetDuration ("build_cache.ttl" )
294
+ cacheTTL := configuration .Settings .GetDuration ("build_cache.ttl" ). Abs ()
295
295
buildcache .Purge (paths .TempDir ().Join ("arduino" , "cores" ), cacheTTL )
296
296
buildcache .Purge (paths .TempDir ().Join ("arduino" , "sketches" ), cacheTTL )
297
297
}
Original file line number Diff line number Diff line change 16
16
package configuration
17
17
18
18
import (
19
+ "fmt"
19
20
"path/filepath"
20
21
"strings"
21
22
"time"
@@ -69,4 +70,6 @@ func SetDefaults(settings *viper.Viper) {
69
70
settings .BindEnv ("directories.Downloads" , "ARDUINO_DOWNLOADS_DIR" )
70
71
settings .BindEnv ("directories.Data" , "ARDUINO_DATA_DIR" )
71
72
settings .BindEnv ("sketch.always_export_binaries" , "ARDUINO_SKETCH_ALWAYS_EXPORT_BINARIES" )
73
+ fmt .Println (settings .GetDuration ("build_cache.ttl" ))
74
+ panic (false )
72
75
}
Original file line number Diff line number Diff line change 33
33
to the sketch folder. This is the equivalent of using the [ ` --export-binaries ` ] [ arduino-cli compile options ] flag.
34
34
- ` updater ` - configuration options related to Arduino CLI updates
35
35
- ` 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).
36
42
37
43
## Configuration methods
38
44
You can’t perform that action at this time.
0 commit comments