I am still struggling with pacman having the server error limit enabled by default. My attempt to fix this for my use case with http headers  was reject.
Also someone proposed to add a configuration option to disable server error limit ... It was rejected as well.
But I guess the best way to solve this is finally implementing an option "CacheServer", as requested a long time ago . Looks like Allan did not fine the "spare 30 minutes"  to implement... :)
Thus I would like to have a look. Still I would like to have a rough guide where to put what and how to glue things. Anybody wants to share some thoughts what an acceptable solution should look like?
 https://lists.archlinux.org/pipermail/pacman-dev/2021-May/025159.html  https://bugs.archlinux.org/task/71352  https://bugs.archlinux.org/task/23407  https://lists.archlinux.org/pipermail/pacman-dev/2021-June/025184.html