-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat(cache): add clear cache command #241
Conversation
When the mite data are updated (new projects, customers or services) is useful to clear the cache, in order to get the updated changes. Otherwise also if there are new projects, mite-cli will not show them, until the cache is rebuild with the fresh data from mite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! |
I’ve changed some minor things. Will merge it soon. There also could be a more specific cache.clear function that could be called from the "customer-new" command or similar to clear the cache automatically when the cached data is changed by a mite-cli command. |
# [1.11.0](v1.10.4...v1.11.0) (2023-07-08) ### Features * **cache:** add clear cache command ([#241](#241)) ([007a2c3](007a2c3))
🎉 This PR is included in version 1.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Purpose
I faced the problem, that I could not see new project, customer or services while using mite-cli, because those were updated in mite but I was using an old cache.
I find useful to have a command to clear the cache. I don't know the codebase very well, I tried to contribute with the quick solution I build for myself.
Of course, feel free to point me in the right direction and decline the PR if there are other more elegant solutions.
Description of Change
My quick solution was directly to replace the content of the file were the cache is saved with an empty object.
Then, the next time
mite new
is used, then the cache will be updated with fresh data.Todos