set a longer cacheLength on [librariesio] badges #7692
Merged
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.
We currently run with two libraries.io tokens, which is mostly enough.
Another useful thing we can do is reduce the number of requests we need to make in the first place by cacheing badges longer.
The bower license/version and libraries.io sourcerank badges already have a
cacheLength
set on them based on the category. There's also a bunch of libraries.io badges that don't have any specificcacheLength
set so they just use the default. All the data on libraries.io gets fetched from other platforms/registries on a schedule. Changes take a while to propagate so I'm not concerned about setting a bit of a longercacheLength
on these. Not sure if 900 seconds is enough to make much of a difference but lets give it a go.This isn't a fix for #7445. Independently I need to work that out and fix it, but this should hopefully reduce the chance of us running out of rate limit.