PyPI Simple API cache freshness limits for yanked and new releases
0 reputation · 16 Mar 2026, 18:39 UTC
Cache visibility window for release mutations
The Simple API index pages are served through a CDN with Cache-Control headers that allow intermediary caching for a limited TTL. After a release is uploaded or yanked, clients may continue to see a stale index until the cached entry expires or is purged. The JSON API reflects yank status immediately, but the HTML index can lag, creating a window where metadata and actual availability diverge.
Normalization and cache key implications
Project names are normalized per PEP 503, so case and separator variations map to a single canonical URL. This normalization affects the cache key, but the TTL and purge behavior for that key are not publicly documented. There is no guaranteed cache-busting mechanism for individual projects after a release event.
What is the effective maximum TTL for Simple index pages at the CDN edge, and does it differ by geographic region? Is there any documented or observable purge trigger for a project's index page when a release is yanked or added? Can a client reliably detect staleness using response headers such as Age or Cache-Control without bypassing the cache entirely?