Skip to content
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

set a longer cacheLength on [librariesio] badges #7692

Merged
merged 2 commits into from
Mar 7, 2022

Conversation

chris48s
Copy link
Member

@chris48s chris48s commented Mar 6, 2022

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 specific cacheLength 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 longer cacheLength 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.

@chris48s chris48s added the service-badge New or updated service badge label Mar 6, 2022
@shields-ci
Copy link

shields-ci commented Mar 6, 2022

Warnings
⚠️ This PR modified service code for librariesio but not its test code.
That's okay so long as it's refactoring existing code.
Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!

Generated by 🚫 dangerJS against dce1b15

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds reasonable to me 👍

@repo-ranger repo-ranger bot merged commit 53cb1da into badges:master Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants