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

Handle stale data for daily/weekly resets #113

Open
darthmaim opened this issue Mar 27, 2019 · 3 comments
Open

Handle stale data for daily/weekly resets #113

darthmaim opened this issue Mar 27, 2019 · 3 comments
Labels
enhancement waiting for api These tasks can't be finished without some changes to the official Guild Wars 2 Api

Comments

@darthmaim
Copy link
Member

Add new interfaces DailyReset and WeeklyReset and a new Handler that returns [] for those endpoints if the endpoints were last modified before the last reset. This avoids stale data.

@darthmaim
Copy link
Member Author

This is currently not possible without making an additional request to /v2/account, because /v2/account/raids and /v2/account/dungeons don't contain the last_modified timestamp.

@darthmaim darthmaim added enhancement waiting for api These tasks can't be finished without some changes to the official Guild Wars 2 Api labels Oct 27, 2019
@shehi
Copy link

shehi commented Oct 25, 2023

Afaik, API requests can contain a request header If-Modified-Since or Last-Modified. Everytime request is made, the response can be cached with the timestamp of request and the next time a new request is sent for potentially updated data, that timestamp can be sent as those aforementioned headers. Won't API return 203 (Not Modified) if data is still the same? If yes, then you don't really need a timestamp accompanying returned data. Just cache the timestamp of last request at your end and use it with appropriate request headers to check for updates.

@darthmaim
Copy link
Member Author

Sadly /v2/account/raids and /v2/account/dungeons don't support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement waiting for api These tasks can't be finished without some changes to the official Guild Wars 2 Api
Projects
None yet
Development

No branches or pull requests

2 participants