Merge pull request #46947 from thaJeztah/24.0_backport_gc_time_filter
[24.0 backport] builder-next: fix timing filter for default policy
This commit is contained in:
commit
99dfa74582
1 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@ package worker
|
|||
|
||||
import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/moby/buildkit/client"
|
||||
)
|
||||
|
@ -30,12 +31,12 @@ func DefaultGCPolicy(p string, defaultKeepBytes int64) []client.PruneInfo {
|
|||
// if build cache uses more than 512MB delete the most easily reproducible data after it has not been used for 2 days
|
||||
{
|
||||
Filter: []string{"type==source.local,type==exec.cachemount,type==source.git.checkout"},
|
||||
KeepDuration: 48 * 3600, // 48h
|
||||
KeepDuration: 48 * time.Hour,
|
||||
KeepBytes: tempCacheKeepBytes,
|
||||
},
|
||||
// remove any data not used for 60 days
|
||||
{
|
||||
KeepDuration: 60 * 24 * 3600, // 60d
|
||||
KeepDuration: 60 * 24 * time.Hour,
|
||||
KeepBytes: keep,
|
||||
},
|
||||
// keep the unshared build cache under cap
|
||||
|
|
Loading…
Reference in a new issue