-
Notifications
You must be signed in to change notification settings - Fork 88
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
Separate the homepage categories API from the AOTD and Banners #4343
Comments
They are already separate? I'm not sure what you're calling - I guess you're not actually using the real backend? https://flathub.org/api/v2/docs Keep in mind, that we don't keep the api stable and don't give gurantees |
I'm talking about flathub.org. The problem I encountered was that
So switching between Trending, Popular, New, Updated showed different AOTD. What I'm suggesting is completely decoupling AOTD from en.json or not GETing a separate en.json for each category (since they all have the same data as far as I can tell). That way browsers won't have 4 different cached versions. Not sure if I'm misinterpreting things, but the AOTD became the same among all categories only after I cleared my cache completely. |
In general, we need stuff to be cached. What you're seeing is also an automatic mechanism, caches die after some amount of time on the server side and will then get regenerated with the next request hitting them for that language. We don't configure at all what |
I'm doing a terrible job at describing it and probably misunderstanding how it works, it's not that important or serious but let me try one more time: This is an edited recording to showcase what I experienced. The 'New' category's en.json was cached in my browser with the previous day's AOTD while the other categories weren't. That caused flathub to show different AOTD based on the current category Screencast.From.2024-12-22.22-10-07.mp4What I'm suggesting is either:
There are 5 different endpoints that get cached individually but return the same data. Getting rid of the separate |
I think this is a similar issue vercel/next.js#27638 edit: from what I gathered, it's not possible to make it ignore query params on |
Had this happen again today, the AOTD was OBS and it only updated to GNOME Extensions after clicking the 'New' tab |
Recently I had an issue where the 'updated' category API response was cached but the others weren't. That led to the AOTD being the previous day's and the other categories having that day's.
Would it possible to separate them into two endpoints? One for the categories and another for the banner / AOTD?
edit: Actually if all
en.json?category=<category>
return all other categories as well, why are they separate endpoints to begin with, instead of justen.json
?The text was updated successfully, but these errors were encountered: