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

Include http subdirectory in 'pip cache info' and 'pip cache purge' #8910

Merged
merged 2 commits into from
Oct 2, 2020

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Sep 23, 2020

Fixes #8892.

Example:

$ pip cache info
HTTP files location: /Users/hugo/Library/Caches/pip/http
HTTP files size: 1202.4 MB
Number of HTTP files: 2106
Wheels location: /Users/hugo/Library/Caches/pip/wheels
Wheels size: 67.1 MB
Number of wheels: 139
$ pip cache purge
Files removed: 2245

@pradyunsg pradyunsg added C: cache Dealing with cache and files in it type: enhancement Improvements to functionality labels Sep 24, 2020
Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good to go? I guess I'll wait a bit for more eyeballs on this, but this looks great @hugovk! ^>^

@xavfernandez
Copy link
Member

It seems strange that pip cache info now mentions HTTP files but that pip cache list does not provide a way to list them.

@hugovk
Copy link
Contributor Author

hugovk commented Sep 25, 2020

They could be listed, but I'm not sure if is of any practical use.

Here's mine (find /Users/hugo/Library/Caches/pip/http -type f):

list-of-http-files.txt

174 lines like:

/Users/hugo/Library/Caches/pip/http/0/6/d/4/7/06d477c8989727a385fef25a091bf538e3d3ffb7704dd4305590c1aa
/Users/hugo/Library/Caches/pip/http/0/6/e/9/e/06e9e0c4454b68908344d70ef700c97dec1d21c761d561c1c5894080
/Users/hugo/Library/Caches/pip/http/0/6/b/0/0/06b00e550878f90905e993e88197ac4a89508898b31475716f4f8045

And this is after I purged the http cache yesterday. It's now 54.5 MB. Before purging it was 1202.4 MB, so that'd be maybe 4,000 lines like that?

Copy link
Contributor

@eamanu eamanu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eamanu
Copy link
Contributor

eamanu commented Oct 1, 2020

IMO This is a good PR but I'm not sure if the it closes issue mention it.

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's gooooo

@pradyunsg pradyunsg merged commit 8aab76c into pypa:master Oct 2, 2020
@hugovk hugovk deleted the pip-cache-http branch October 2, 2020 08:30
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: cache Dealing with cache and files in it type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to clean http cache with pip
4 participants