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 results from Swiftype to avoid re-searching related content on every page load #583

Closed
jerelmiller opened this issue Aug 11, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@jerelmiller
Copy link
Contributor

Description

Swiftype's API comes at a cost. We have a limit to the number of searches we can do via Swiftype before we are charged for more usage. To try and keep cost down and avoid unnecessary search requests, we need to implement some kind of caching mechanism for the results so that visiting guide pages incur as least cost as possible.

TODO:

We need to define how we want to cache the results. We can use something like the browser's local storage, or something like service workers to cache network requests on a per-user basis. Another alternative would be to fetch the results during the build and add the results to the GraphQL schema, which means we only incur cost when the site builds.

@jerelmiller jerelmiller added the enhancement New feature or request label Aug 11, 2020
@jerelmiller
Copy link
Contributor Author

Closing this ticket as this is better captured in #582 and #589

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

No branches or pull requests

1 participant