Closed winchesHe closed 2 months ago
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
📝 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