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

Caching unchanged content ExtendedInfinityModel #473

Open
DeRaowl opened this issue Jan 16, 2024 · 0 comments
Open

Caching unchanged content ExtendedInfinityModel #473

DeRaowl opened this issue Jan 16, 2024 · 0 comments

Comments

@DeRaowl
Copy link

DeRaowl commented Jan 16, 2024

Is there a way ember infinity support fetching data which is changed. Consider I am fetching a 50 projects(I have mentioned query params below) in batch. And I don't need to hit entire set of API everytime.

Once it is fetched for very first time render list and I navigate between routes I will pass the last project's ID so that backend returns only the projects after last project id I have passed to backend.

Initially I have fetched 50 projects when I visit /project route and after some time I come back to this route I only pass project[49].id so that backend will only send next changed projects.

Do let me know if we support this or any alternative way to do this with ExtendedInfinityModel?

const query_params = {
      project_id: project.id,
      perPage: 50,
      perPageParam: 'page[limit]',
      pageParam: null,
      countParam: 'cursor',
    };
    
return this.infinity.model('build', query_params, ExtendedInfinityModel);
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

1 participant