Apt-cacher-ultra – Protecting you from the next Ubuntu.com outage
github.com
github.com
It survives upstream outages by taking snapshots of the state when the upstream is healthy, and only adopting new snapshots when they are verified healthy. It can track what packages you typically request, and when the upstream updates it will proactively request any of those that are updated; new snapshots will delay adoption until your "hot" packages are in cache.