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

Clear cache filesystem when emptying the store cache #477

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

js2702
Copy link

@js2702 js2702 commented Dec 9, 2024

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Bug fix

⤵️ What is the current behavior?

When there is a desync between the filesystem and the store those files are never cleaned up, filling up the filesystem. This desync can happen because of bugs in the library like the ones listed in #476.

🆕 What is the new behavior (if this is a feature change)?

When calling emptyCache we can also clean up the cache directory associated to the store to clean up dangling files as well.

💥 Does this PR introduce a breaking change?

It adds a method to the file system interface.

🐛 Recommendations for testing

Previously files were not deleted when calling removeFile(), so it only affects extra dangling files in the cache store.
So to test it just add an extra file and call emptyCache.�The current emptyCache test has been tweaked to account for this behavior.

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated
  • Rebased onto current develop

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

Successfully merging this pull request may close these issues.

1 participant