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

Use a query cache on the source block component #54

Open
ggrossetie opened this issue Apr 19, 2021 · 1 comment
Open

Use a query cache on the source block component #54

ggrossetie opened this issue Apr 19, 2021 · 1 comment

Comments

@ggrossetie
Copy link
Contributor

The goal is to reduce the number of queries sent to Neo4j sandbox, aura and the GraphGists portal.

It should be possible to populate the cache from a query result generated at build time.
For instance, the GraphGists build could generate static files in the attachments directory that contain query results.

The source block component will then check if a file exists for a given couple page-query.

The source block component will use the cache when available. If not, it will switch to interactive mode and query the backend.

We could use a md5sum of the query as a unique key.

We can use https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage to save data.

@ggrossetie
Copy link
Contributor Author

As mentioned by Adam, it might be better to implement caching into the graphgist API:

For graph gists where the queries don't change then I think we could auto generate the results because the queries won't change. We could run the queries at build time and mock the results. I think that caching should be implemented into the graphgist API

Putting this issue on hold until we agree on a caching strategy.

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