Skip to content

Commit

Permalink
Merge pull request moby#46861 from tonistiigi/gc-time-filter
Browse files Browse the repository at this point in the history
builder-next: fix timing filter for default policy
  • Loading branch information
thaJeztah authored Nov 29, 2023
2 parents f6533a1 + 49d088d commit 5dde37c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions builder/builder-next/worker/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package worker

import (
"math"
"time"

"github.com/moby/buildkit/client"
)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5dde37c

Please sign in to comment.