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

Cache responses from queue pagination API #11310

Closed
1 of 2 tasks
lowellrex opened this issue Jul 8, 2019 · 0 comments · Fixed by #12148
Closed
1 of 2 tasks

Cache responses from queue pagination API #11310

lowellrex opened this issue Jul 8, 2019 · 0 comments · Fixed by #12148

Comments

@lowellrex
Copy link
Contributor

lowellrex commented Jul 8, 2019

Implement some way to store responses from the pagination API in state (result sets keyed off of the combination of filters/sorts/pages?) so we don't have to make an API request for all new page requests, filter changes, and re-sorting with a loading spinner when those API requests are in flight. This caching allows us to prevent making additional API calls when the pagination API has already returned a set of tasks that fit on a single page, so we have all of the information we need to apply additional sorts and filters without hitting the server.

Blocked by

Acceptance criteria

  • Avoid making redundant requests to pagination API.
@lowellrex lowellrex self-assigned this Sep 17, 2019
va-bot pushed a commit that referenced this issue Sep 17, 2019
Connects #11310. Adds naive caching based only on the URL of the endpoint we are making the task page request to. Later on, we can add the ability to bypass the API request when there is only a single page of results (thus the front-end already has access to all of the rows that the back-end could possibly return so we can do all of the filtering on the front-end without needing to involve the back-end).

In the screen capture below, notice that the second time we make a request for hearing clarification tasks we do not make an API request.

![naive_caching](https://user-images.githubusercontent.com/32683958/65074122-29092b80-d962-11e9-849e-fcfebf44ddf1.gif)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant