How to skip or reset Dedup Interval? #1623
Replies: 2 comments
-
I was about to ask a very similar question. I have a use case where I need to wipe SWR back to zero. For the purpose of science I tried a |
Beta Was this translation helpful? Give feedback.
-
Is there any update on this issue? seems like a common case |
Beta Was this translation helpful? Give feedback.
-
Hi 👋
I have a response interceptor that redirects user back to login if the token is invalid, but if the user login again before
dedupingInverval
ends my page's content is not loaded.I'm using a high value for
dedupingInterval
like 5000 ms to prevent multiple repeated calls while navigating between pages.So the first api call fails because of the token, then when the user gets back to the page it is not fetching data again (even the first one failing).
I tried calling
cache.clear()
but dedup info is no on cache or mutate, is there a way clear all concurrent_promises? I saw there is a newunmount
oninitCache
response, is there a way to access it?Beta Was this translation helpful? Give feedback.
All reactions