Skip to content

Commit

Permalink
fix: compute total cache usage on any new cache policy opt
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Chadwell <[email protected]>
  • Loading branch information
jedevc committed Oct 2, 2024
1 parent 827d582 commit 9380231
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ func (cm *cacheManager) pruneOnce(ctx context.Context, ch chan client.UsageInfo,
}

totalSize := int64(0)
if opt.MaxStorage != 0 {
if opt.MaxStorage != 0 || opt.MinStorage != 0 || opt.Free != 0 {
du, err := cm.DiskUsage(ctx, client.DiskUsageInfo{})
if err != nil {
return err
Expand Down

0 comments on commit 9380231

Please sign in to comment.