goharbor / acceleration-service

Provides a general service to support image acceleration based on kinds of accelerator like Nydus and eStargz etc.
Apache License 2.0
77 stars 27 forks source link

feat: use lease to manage local cache for gc #157

Closed Desiki-high closed 1 year ago

Desiki-high commented 1 year ago

Now acceld's GarbageCollect will clear all caches when content size is over the threshold. We should use the lease to choose which content blob should be reserved. The updatedAt can help us to choose blobs.

Changes:

TODO: We should update the order of GC from LRU to LRFU by usedCountLabel.

Reference: https://github.com/goharbor/acceleration-service/issues/141.