[Apt-cacher-ng-users] Limit cache size and eviction in apt-cacher-ng
Eduard Bloch
edi at gmx.de
Thu Jul 14 05:46:05 UTC 2016
Hallo,
* Octavian Hornoiu [Wed, Jul 13 2016, 01:54:03PM]:
> Is there a way to limit the cache size due to space constraints?
> Is there a way to evict packages from the cache to reduce the total cache
> size below a certain limit?
> Thanks!
> Octavian
At the moment, no. But I am well aware of this trouble since and there
are some ideas on how to design a cleanup strategy.
We hit the classic problem here - how to decide which packages to keep
and which to throw away?
ATM I tend to create some kind of "importance rating" which would be
calculated from the number of downloads of a certain file and the age of
that downloads and the file size. The factors in this formula would be
customizable. In addition, there could be a classic bin-packing problem
solver that estimates how to remove bigger files to preserve smaller
files. So, by the end, a bit latex font package might be removed if only
used by one person in order to keep a dozen of smaller packages that are
likely to be used by multiple people.
But eventually all this might be just reading tea leaves. Especially
when a popular package has been renamed, the algorithm needs to identify
the predecessor and migrate the rating accordingly.
Regards,
Eduard.
More information about the Apt-cacher-ng-users
mailing list