Enabling external caching resource for first time renders #7342
Unanswered
peterHakio
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an app that needs to fetch allot of aggregated data. This data takes allot of time to calculate the first time it is calculated and it rarely change very much We are discussing multiple solutions to this regarding caching, and we can see that it would be to much work for us to have a logic that constantly keep all records exactly correct in a caching layers and have the right invalidations always correct. Our dream solution would be that we would cache the responses, and when react query needs a response it sends out two requests one to the caching and one to the slow resource, the cached resource is then displayed, but is replaced when the slow resourse returns.
In practice it could be done by sending two requests one with cached enabled and one without cached enabled and then have the response for the not cached query have presendense. I know it is not for all, but I think it could be a powerfull option to have.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions