-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
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:
- 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 ofpip
, you can clean the cache by doingpip clean --old-http-cache
". (I made that command up, just pretend it's the correct command). - Automatically delete the whole old cache.
- 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
- I agree to follow the PSF Code of Conduct.