Skip to content

Respect the max age cache control for simple API responses, with option to modify #13680

@notatallshaw

Description

@notatallshaw

In #5791 caching simple API responses was turned off, even if a max age cache control response was sent back, this solved one use case at the performance cost of everyone.

When doing multiple pip commands, especially ones that don't require downloading distributions, like pip lock, pip install --dry-run, and pip install where the distributions are already in cache, this contributes to a significant amount of the resolution time.

uv respects the the max age cache control and gives users a way to set their own values for the API and files: https://docs.astral.sh/uv/concepts/indexes/#customizing-cache-control-headers.

I would like to agree in principle we should do the same, and then we can agree on how to do it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions