-
Notifications
You must be signed in to change notification settings - Fork 14
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: all up to data do not show select and add fetch cache #61
Conversation
* feat: add sort disabled pkg when select compoents * feat: optimize display
* feat: optimize log and less color * feat(doctor): add peerDependencies check
* feat: optimize log and less color * feat(doctor): add peerDependencies check * docs: update README
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.
I've one question about the cache.
- lets say i run the cli and fetch the versions. now there is a cache in my local. next time when i run again, it will have a cache hit (within 30 mins).
- now NextUI releases a bug fix release
- if i run it again (still within 30 mins), does it still have a cache hit or it will invalidate the cache and re-fetch again?
It still uses cached data unless 30 minutes have passed |
but what if i need to upgrade? users may not know they need to wait for 30 mins. is there any way to invalidate by themselves? ideally if there is a new release, it shouldn't use the cache. |
I think we could add a option to run without cache, and add notes in docs, usually, this scenario should occur relatively infrequently |
second thought - i think we just need to handle it on our side. it doesn't make sense to invalidate cache from user side. |
But if that's the case, we need to send requests every time run, or only keep fetching component's data every time |
That's a good point. If so we may add a option like you said to run without cache so that users don't need to wait for the cache expiry time in order to perform some actions like upgrade. |
@winchesHe why don't we validate the cached version vs the latest version and rewrite the cache only when the latest version changes? (only for globally installed cli) |
@jrgarciadev It's because we need to send a request every time we run a command to validate whether it is latest version, that's why I added a default cache of 30 minutes, so that within 30 minutes, if we run the command again, we won't send the same request, therefore, it can improve the running speed |
* feat: add vite init template * docs: update init command
📝 Description
When first run when fetch latest version, next time run will check whether cache data expired(30min) and using cache data
Upgrade
Remove
Every up to date pkg show in bottom
✅ Type of change