Repository navigation
Revalidate request in the background, after returning the response #640
|
Hello, I need to return old (stale) data and revalidate it in the background after I return the data. thanks |
Answered by
arthurfiorette
Dec 18, 2023
Replies: 2 comments 3 replies
|
Please use hydrate: https://axios-cache-interceptor.js.org/config/request-specifics#cache-hydrate Else, you can just create another call to axios.get() without await, which will revalidate in the background. Automatic support for this feature is planned to be implemented but have some architectural problems, as we cannot resolve a request and still call its adapters. |
3 replies
|
For future ref, this twitter thread my help: |
0 replies
Answer selected by
arthurfiorette
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For future ref, this twitter thread my help:
https://twitter.com/adamdehaven/status/1733228594313277608