The GC policies allow a lot of customization to make sure we can prioritize different types of content.
But when it comes the time to collect content, buildkit sorts all the contents depending the frequency the content has been used and the last date used. There is no way to prefer frequency over age, or the other way. See https://github.com/moby/buildkit/blob/master/cache/manager.go#L1652-L1657
It would be great to be able to configure the relative importance between age and frequency, for fine grain tuning. I guess it would be a global config, and not a policy level one.
The GC policies allow a lot of customization to make sure we can prioritize different types of content. But when it comes the time to collect content, buildkit sorts all the contents depending the frequency the content has been used and the last date used. There is no way to prefer frequency over age, or the other way. See https://github.com/moby/buildkit/blob/master/cache/manager.go#L1652-L1657
It would be great to be able to configure the relative importance between age and frequency, for fine grain tuning. I guess it would be a global config, and not a policy level one.