Software package download proxy
rpmgot is a simple/lightweight software package download proxy. It was designed to run on an OpenWRT router with some USB storage. So it is fully implemented as an
The basic idea has been implemented multiple times. For example refer to this article on a squid based implementation.
Unlike squid, which once you include all its dependencies can use up over 1MB of space just to install it, this software has very few dependencies.
The idea is for small developers running the same operating system version(s) would benefit from a local mirror of them, but they don't have so many systems that it's actually reasonable for them to run a full mirror, which would entail rsyncing a bunch of content daily, much of which may be packages would never be used.
rpmgot implements a lazy mirror something that would appear to its client systems as a full mirror, but would act more as a proxy. When a client installed a particular version of a particular package for the first time, it would go fetch them from a "real" mirror, and then cache it for a long time. Subsequent requests for the same package from the "mirror" would be served from cache.
The RPM files are cached for a very long time. Normally it is an awful, awful idea for proxy servers to do interfere with the
Cache-Control / Expires headers that sites serve. But in the case of a mirror, we know that any updates to a package will necessarily bump the version number in the URL. Ergo, we can pretty safely cache RPMs indefinitely.
You can find this in Github.