revalidateIfStale #2015
Unanswered
standbyoneself
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
First of all I wanna say words of gratitude for the authors/contributors of it as it's really simplifies my work.
I have a question about
revalidateIfStale
option. By default its value is true. Example the actions below:Also I show the loader if data is undefined. I visited page 1 (loader was shown), then page 2 (loader was shown), then return back to the page 1 (loader was not shown, because the key && data already were cached). But when i jumped from page 2 back to page 1, what is the actual order of actions of SWR?
Cached key -> retrieve stale data from cache -> trigger new request -> populate cache with new data? Does it populate cache with new data or not? Actually cache is updated twice?
I wanna deal with it because I work with live-feed-like project.
Please do not ask like "see #" because I have already researched docs/issues and it's still not clear properly.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions