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

How to cache data ? #280

Open
gaetan-hexadog opened this issue Oct 25, 2023 · 2 comments
Open

How to cache data ? #280

gaetan-hexadog opened this issue Oct 25, 2023 · 2 comments

Comments

@gaetan-hexadog
Copy link

gaetan-hexadog commented Oct 25, 2023

Hi,

Is it possible to cache data. I use srw to usually handle cache. This way I can view data even if I lost the network.

How can we do have cache for fetched data with api-query ?

Thanks in advance.

@robsontenorio
Copy link
Owner

@gaetan-hexadog I am afraid this out of scope of this package. Once offline usage requires a ton of boilerplate.

About cache I would advice you to handle it on backend, because it has more powerful options.

@gaetan-hexadog
Copy link
Author

gaetan-hexadog commented Oct 25, 2023

Thanks for your answer.

Unfortunatly managing cache on backend side does not help me to view data in my PWA when there is no network.

Is there a way to intercept the request made by the api-query package to re-route on srw instead of directly using the $http request internally ?

P.S: I mentionned srw but it could be any other Cache management package which could be usefull in addition to this package.

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

2 participants