You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the current use case that I have right now, useSWR are loaded dynamically, but we do have a static list of preloads that load everytime my user opens up the website. The issue I'm facing right now is that when the user opens the website, then move to other organization (without loading the page that calls the useSWR). This meant that the user are shown wrong data on the other organization due to it having the same keys.
I know that I could just add the id of the organization on the preload keys. But I would rather know that all the data from the other orgs are not cached via SWR. So I propose a way to clear out the preload cache for those use case where the preload data are not loaded to the normal cache via useSWR.
While referencing the other issue related to this (preload not inside cache), I've also have made a simple implementation in this PR #4194
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Due to the current use case that I have right now, useSWR are loaded dynamically, but we do have a static list of preloads that load everytime my user opens up the website. The issue I'm facing right now is that when the user opens the website, then move to other organization (without loading the page that calls the useSWR). This meant that the user are shown wrong data on the other organization due to it having the same keys.
I know that I could just add the id of the organization on the preload keys. But I would rather know that all the data from the other orgs are not cached via SWR. So I propose a way to clear out the preload cache for those use case where the preload data are not loaded to the normal cache via useSWR.
While referencing the other issue related to this (preload not inside cache), I've also have made a simple implementation in this PR #4194
Beta Was this translation helpful? Give feedback.
All reactions