As you might expect, pypip.in employes a fair amount of caching in the backend to control load on the imaging API and servers.
For a long time, this cache was entirely managed by Varnish and was doing a fantastic job. Varnish has a hit:miss ratio of 10:1, for every 10 hits we get 1 miss. This is a fairly decent ratio when you consider where these images are displayed, how often they are viewed and that Varnish only caches the images for an hour.
The impact on PyPI
You will firstly need to understand how pypip.in used to work to understand the changes that were made and why they were made.
Let’s set up the request first - a request for a shield is made and it is not present in the Varnish cache.
Request received in API layer | v API layer queries PyPI | v PyPI …