You might want to give a try to apt-cacher-ng.
apt-get install apt-cacher-ng
apt-get install apt-cacher-ng
And despite the name, newer versions work with yum too (although I found I had to disable the fastest mirror yum plugin to get reliable caching).