You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If packages are distributed over multiple indices, at least one index contains the requested package while the other indices will return a 404. However, this 404 response is not cached, so the non-containing index will repeatedly be queried for package existence. This hurts performance.
I'm concerned about side effects this might have, such as a user uploading a package running pip install my_package==new_version, would caching the 404 prevent them from seeing the new package? Or other similar scenarios.
At the moment I believe pip checks all indexes for all packages, every request. Because the behavior of handling multiple indexes, and more so what to do with non-200 responses, is not standardized, I would be surprised if someone isn’t relying on pip’s current behavior here.
Description
If packages are distributed over multiple indices, at least one index contains the requested package while the other indices will return a 404. However, this 404 response is not cached, so the non-containing index will repeatedly be queried for package existence. This hurts performance.
Expected behavior
In the cache controller, HTTP status code 404 should be cached.
pip version
main
Python version
3.10
OS
MacOS
How to Reproduce
pip compile
with multiple indices, e.g. A and B.Output
When fetching:
and
Code of Conduct
The text was updated successfully, but these errors were encountered: