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

[FEATURE] Add support to list & remove the cache content #19

Closed
ilg-ul opened this issue Nov 13, 2019 · 4 comments
Closed

[FEATURE] Add support to list & remove the cache content #19

ilg-ul opened this issue Nov 13, 2019 · 4 comments

Comments

@ilg-ul
Copy link

ilg-ul commented Nov 13, 2019

What / Why

I am using pacote to download and cache, in addition to reasonably sized source libraries, of large binaries (like toolchain distributions, hundreds of MB) and I would appreciate a method to enumerate the content of the cache, such that later to be able to selectively remove some cached files. For now the only method I found was to completely remove the cache, which is far from optimal.

In other words, for the CLI app, I suggest two new commands, like list and remove, obviously matched by API calls.

Thank you,

Liviu

@isaacs
Copy link
Contributor

isaacs commented Nov 19, 2019

I think this more properly belongs in https://github.com/npm/cacache

Care to add this issue over there? I believe @claudiahdz suggested writing a CLI for cacache, might be a good idea to include this idea in it.

@isaacs isaacs closed this as completed Nov 19, 2019
@ilg-ul
Copy link
Author

ilg-ul commented Nov 19, 2019

Ah, right, I forgot that cacache is a separate module.

If I get it correctly, the API allows to list and remove entries, I'll use them in my application and if I have any troubles I'll open issues there.

As for the cacache CLI, if complete, I expect it to include the commands to list and remove content.

I created a ticket there: npm/cacache#26

@isaacs
Copy link
Contributor

isaacs commented Nov 20, 2019

Yes, cacache has an API to list and remove specific entries, so if you're using it in JS, that should give you what you need. (The readme should detail all that stuff.) Definitely let us know if it doesn't meet your needs :)

@ilg-ul
Copy link
Author

ilg-ul commented Nov 22, 2019

let us know if it doesn't meet your needs :)

it generally does, I can list and remove entries, but I encountered a small problem with put.stream(), I opened a separate ticket for it (npm/cacache#27).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants