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

Change cache policy for featured mod API query #1832

Closed
Askaholic opened this issue Jul 19, 2020 · 5 comments
Closed

Change cache policy for featured mod API query #1832

Askaholic opened this issue Jul 19, 2020 · 5 comments

Comments

@Askaholic
Copy link
Collaborator

The list of featured mods pretty much never changes, yet it gets fetched each time you log in. As a result, if the API goes down and the client can't fetch the list of featured mods anymore, you won't be able to play games even if you have all of the right files already downloaded, and generally all other FAF services are working.

I think the ideal solution would be to try fetching the featured mods when the client is started (or the tab is loaded or whatever), and if the request fails, then fall back to the cached version. If this is not easy to do, then just adding some caching to that request would probably be fine too. Maybe set the cache expiry to a few days.

Wanna have the bug fixed quickly?
Visit Issue hunt...
Issue hunt

@Sheikah45
Copy link
Member

This won't actually solve the issue of people not being able to play if the api goes down. This is because the api is still needed for people to update to the most recent version of the game and to download the mods and maps that people are playing on.

Bypassing that would either lead to errors there or people having desyncs and map not loaded and being kicked for not having the right mod version which might be worse than what currently happens.

@Askaholic
Copy link
Collaborator Author

I think I’m assuming they have the game files and the map already (or those things are cached still). Basically if they have all the files, they shouldn’t be blocked from playing because the api went down.

@Sheikah45
Copy link
Member

Yeah I just don't think that is a valid assumption and it is also the fact that all the checks before launching the game will also fail so it is not as simple as just caching the featured mods.

@Askaholic
Copy link
Collaborator Author

Which other checks? I think it’s a pretty valid assumption that someone who only plays dual gap will definitely have dual gap installed and be on the most recent version of faf. And will also be likely to continue to play nothing but dual gap with those same settings. If just seems like if the api goes down briefly it doesn’t need to stop people from being able to join lobbies.

Idk though what all the checks are that the client does.

@Sheikah45
Copy link
Member

Just the ones I mentioned, game version, map version, mod version. And the issue is that those can't be verified that they do have the same required files so it is taking a risk that people would not actually be able to launch. There also a lot of versions of dual gap that might get swapped around pretty often. So I am not sure if people play mostly one or just think they do because it auto downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants