Cache the GitHub API response for 1 hour #20
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
We are hitting the GitHub API every time the page is reloaded. NIWA has ~700 employees, and out of these a few must be accessing the website (less than 50 I'd say), but with the same IP address.
It has happened in the past, and again right now, that GitHub API stopped working for us due to rate limit. I suspect the same might happen in other sites - #19 & #15
Setting an API for GitHub with better rate limit is an option, but not easy to deploy securely to GitHub pages I guess.
Another possibility is actually cache the returned value for 1 hour in the local storage, which gets persisted in the user's browser (it's easy to use, and really fast/simple, but not ideal for sensitive data).
This would reduce the amount of requests sent to GitHub, and avoid us being blocked again 🤞
The text was updated successfully, but these errors were encountered: