feat: rework how often available is updated #921
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.
Previously, the
available
for each of the categories was sent all in one request and this request was only refreshed automatically by the client every few hours, leading to results that weren't always up to date, especially for Pokemon.Now each of the categories has been split up and the requests are made when the respective quick select menus are opened, meaning they should always be up to date*. Since the results are saved in memory server side, the request payloads take almost no time to execute. They are also very lightweight due to just being an array of strings.
*This is also dependent on your config settings, if your available update interval is set quite low, then your users won't benefit from the latest available. The defaults have been lowered.