Difference between apt-cacher and apt-cacher-ng
What exactly is the difference between apt-cacher
and apt-cacher-ng
? I can't seem to find anywhere comparing the two. I've found tutorials and manuals on both of them, and they seem to be the same from the set-up point of view.
Is one better or more reliable than the other? Does one offer services that the other does not? What are the pros and cons of each?
From the documentation (available in /usr/share/doc/apt-cacher-ng/apt-cacher-ng.pdf
, if you have installed it):
The program reuses many ideas behind the other famous proxy, its predecessor apt-cacher 1.x (which has been written in Perl). In contrast to apt-cacher, different aspects have been declared as primary targets during the development of apt-cacher-ng:
- lightweight implementation - allow use on systems with low memory and processing resources
- internal (native) threading - avoiding process fork'ing wherever possible, avoiding kludges for pseudo-thread synchronization, avoiding relying on special file system features for internal operations where possible
- real (effective) support of HTTP pipelining, using an internal client with native stream control (having the nice side effect: reduction of resource overhead and minimization of possible points of failure)
- avoiding featuritis where they cause too much bloat and the functionality can be provided by native OS features
- reliable but efficient content merging in the local package pool, avoiding delivering of wrong data.
As with apt-cacher, explicit tracking of dynamically changed and unchanged files is established, and the use in non-Debian environment is supported.
Long story: Not all goals have been achieved. The initial plan of using background databases to merge any download from any arbitrary location has been dropped because of complexity and performance considerations, reliable heuristics could not be found either. Instead, a semi- automated solution has been created which used machine-parsable files with mirror information, like the one available for Debian mirrors in Debian's CVS repository.