fix: app store ui not updating to show installing plugins; cache npm response for one minute #1871
+44
−39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the user clicks the Update button the App store UI is not showing that the server is doing the update IF there is an error response from the npm registry when fetching the list of plugins & webapps.
Npm registry has rate limits and apparently some people have hit those: in the course of using the App store ui the server fetches the lists of modules and webapps several times, that can cause npm registry to return an error message instead of the listing.
This PR fixes the UI not updating with two separate methods:
The cache should keep the rate limit not intervening and the App store working properly.