JustArchiNET / ASF-ui

The official web interface for ASF
Apache License 2.0
260 stars 37 forks source link

ASF-ui should cache GitHub releases #1624

Open JustArchi opened 1 year ago

JustArchi commented 1 year ago

Checklist

Enhancement purpose

As a third-party service, GitHub has various rate-limits in regards to fetching its resources. We should use cache for all third-party resources that ASF can't fulfill on its own. The caching doesn't have to be excessive, could be even 5 minutes, but lack of any caching can lead to users rate-limiting themselves accidentally purely by navigating across ASF-ui from one tab to another.

Solution

All /api/www/github endpoints should be carefully evaluated and cached. I'm pretty sure the functionality that checks for ASF updates already uses the cache, same mechanism should be used for Releases tab, which from my fast network tab check, always fetches info on each refresh.

Why currently available solutions are not sufficient?

obraz

Can you help us with this enhancement idea?

Somehow, I can test and offer feedback, but can't code

Additional info

/cc @MrBurrBurr

JustArchi commented 1 year ago

Alternative that I thought of would be implementing that caching inside ASF core, but then I take away the freedom from you to invalidate it and force ASF to do the check, and adding additional booleans such as force: true sound nasty and require ASF-ui edits anyway. I believe it'd be best if ASF-ui handled it itself as a direct caller.