Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up to #2984: dealing with old HTTP download caches #12082

Open
1 task done
itamarst opened this issue Jun 9, 2023 · 0 comments
Open
1 task done

Follow-up to #2984: dealing with old HTTP download caches #12082

itamarst opened this issue Jun 9, 2023 · 0 comments
Labels
C: cache Dealing with cache and files in it state: needs discussion This needs some more discussion state: needs eyes Needs a maintainer/triager to take a closer look type: feature request Request for a new feature

Comments

@itamarst
Copy link
Contributor

itamarst commented Jun 9, 2023

What's the problem this feature will solve?

Once #11143 is merged, new versions of pip will use a new HTTP on-disk cache. Old versions will continue to use the old cache, which resides in a different directory.

There is a point in time where that old cache really ought to be deleted. For example, after 5 years essentially no one should care about the old HTTP cache, but anyone who keeps around the same home directory will now be wasting disk space. The more time passes, the less likely the old HTTP cache is in broad use by users.

Describe the solution you'd like

As discussed in #11143, after N(==2 to match deprecation policy?) releases or perhaps a certain amount of time, it will become reasonable to assume that most users on the latest version of pip have stopped using older versions of pip, and therefore the old HTTP cache can be cleaned up.

Potential solutions:

  1. Warn the user, with instructions on how to clean the cache. "You are using X MB in the old HTTP cache, which is only used by versions of pip older than 2023.X. If you are only using new versions of pip, you can clean the cache by doing pip clean --old-http-cache". (I made that command up, just pretend it's the correct command).
  2. Automatically delete the whole old cache.
  3. Heuristics! Automatically delete items in the old HTTP cache that haven't been modified for more than a certain amount of time, on the presumption that they're not relevant (presumably new releases have come out as well). Eventually it will just be empty.

Options 1 and 2 probably imply some future issue to rip the code out when it's assumed most users don't have old HTTP caches anymore.

Option 3 is attractive in that essentially the same code could be applied to the new HTTP cache, so it would be helpful for not having infinitely increasing caches which is currently possible.

Alternative Solutions

N/A

Additional context

N/A

Code of Conduct

@itamarst itamarst added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Jun 9, 2023
@ichard26 ichard26 added state: needs discussion This needs some more discussion state: needs eyes Needs a maintainer/triager to take a closer look C: cache Dealing with cache and files in it and removed S: needs triage Issues/PRs that need to be triaged labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: cache Dealing with cache and files in it state: needs discussion This needs some more discussion state: needs eyes Needs a maintainer/triager to take a closer look type: feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants