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:
Rename the updatedAt to usedat and move to lease bucket (labels).
Add the usedCountLabel in lease bucket.
Rewrite GC by lease. When the local cache size is over eighty percent of the threshold, gc will delete local blobs until the size is less than eighty percent of the threshold which is order by usedat(LRU).
TODO:
We should update the order of GC from LRU to LRFU by usedCountLabel.
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. TheupdatedAt
can help us to choose blobs.Changes:
updatedAt
tousedat
and move to lease bucket (labels).usedCountLabel
in lease bucket.usedat
(LRU).TODO: We should update the order of GC from
LRU
toLRFU
byusedCountLabel
.Reference: https://github.com/goharbor/acceleration-service/issues/141.