Summary
The default prune-cache: true removes pre-built wheels from cache, causing them to be re-downloaded from PyPI on every CI run. This generates unnecessary load on PyPI infrastructure.
What gets pruned vs retained
| Cache content |
Pruned? |
Effect |
| sdists |
❌ Retained |
No re-download |
| Locally-built wheels |
❌ Retained |
No rebuild |
| Pre-built wheels |
✅ Pruned |
Re-downloaded every run |
Most popular packages (numpy, pandas, requests, etc.) distribute pre-built wheels and are affected.
Evidence
Reproduction: https://github.com/ei-grad/uv-cache-issue
Pre-built wheels re-downloaded despite cache hit
Second run, prune-cache: true — job log:
Cache hit for: setup-uv-1-...-with-prune
Cache Size: ~434 MB
Downloading numpy (15.8MiB)
Downloading pandas (10.4MiB)
Locally-built wheels served from cache
First run — run 21582159578:
Building pyspark==4.1.1
Built pyspark==4.1.1
Second run — job log:
No rebuild — locally-built wheel served from cache.
With prune-cache: false — no PyPI downloads
Job log:
Cache hit for: setup-uv-1-...-without-prune
Cache Size: ~1758 MB
Installed 15 packages in 74ms
Impact
Given setup-uv's popularity, the default causes significant unnecessary traffic to PyPI across thousands of CI pipelines.
Suggestion
Not sure I have a good solution. Maybe it would help to make prune-cache keep wheels?
Summary
The default
prune-cache: trueremoves pre-built wheels from cache, causing them to be re-downloaded from PyPI on every CI run. This generates unnecessary load on PyPI infrastructure.What gets pruned vs retained
Most popular packages (numpy, pandas, requests, etc.) distribute pre-built wheels and are affected.
Evidence
Reproduction: https://github.com/ei-grad/uv-cache-issue
Pre-built wheels re-downloaded despite cache hit
Second run, prune-cache: true — job log:
Locally-built wheels served from cache
First run — run 21582159578:
Second run — job log:
No rebuild — locally-built wheel served from cache.
With prune-cache: false — no PyPI downloads
Job log:
Impact
Given setup-uv's popularity, the default causes significant unnecessary traffic to PyPI across thousands of CI pipelines.
Suggestion
Not sure I have a good solution. Maybe it would help to make prune-cache keep wheels?