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

pls add 'remove fully' option to remove() function #53

Closed
fiag opened this issue Jun 21, 2023 · 2 comments · Fixed by #54
Closed

pls add 'remove fully' option to remove() function #53

fiag opened this issue Jun 21, 2023 · 2 comments · Fixed by #54
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@fiag
Copy link
Contributor

fiag commented Jun 21, 2023

According the npm/cacache rm.entry API

By default, this appends a new entry to the index with an integrity of null. If opts.removeFully is set to true then the index file itself will be physically deleted rather than appending a null

thanks a lot!

@zkat zkat added enhancement New feature or request help wanted Extra attention is needed labels Jun 21, 2023
@zkat
Copy link
Owner

zkat commented Jun 21, 2023

doing this would mean that the index would no longer be atomic. That's why deletions are done through appending null.

the JS version of cacache has a verify() method that is expected to be called in a "locked" environment when nothing else is running. I'd like to have that in cacache-rs too.

@fiag
Copy link
Contributor Author

fiag commented Jun 26, 2023

After read verify() method, seem that this method does not delete index files. And the index with an integrity of null will be ignored in the index::ls() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants