fix(web-ui): Add version check cache to reduce GitHub API calls#4932
fix(web-ui): Add version check cache to reduce GitHub API calls#4932roj234 wants to merge 5 commits into
Conversation
|
I'm not sure about caching for a whole day. The limit is 60 requests per hour for unauthenticated requests. I think a 1 hour cache would be okay though so we don't consume more than 2 per hour. |
OK |
|
@roj234 could you please fix the sonar issue? Probably just need to create a helper function to extract some of the logic. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4932 +/- ##
=========================================
Coverage ? 17.84%
=========================================
Files ? 111
Lines ? 24029
Branches ? 10619
=========================================
Hits ? 4288
Misses ? 18182
Partials ? 1559
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
|
Bundle ReportChanges will increase total bundle size by 546 bytes (0.03%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sunshine-esmAssets Changed:
Files in
|
|
Could you fix the lint errors and rebase? Then I will test this and if all is good, I'll merge it. |
|
Add caching for version data to reduce API calls.
Refactor version fetching logic into a separate function.
|
|
Just got around to testing this. Unfortunately it doesn't show notifications for the pre-release versions if the user has that option enabled. |
|
我气死了一个十行的pr拖了一个多月了你自己去写不行吗又在那里要过代码质量又要过测试一个月才一个回复一个人高傲的像大公司你以为我非要这个contributor吗爱修不修我直接close反正我本地还能patch |
|
🫡 |



Description
Each time I refresh Sunshine page, It will request Github API twice, and Github API (no api key) have a one-hour limit, which shared with many other projects.
This PR have added an 1 day cache, so that Sunshine UI only request Github API once per day.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage