-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Milestone
Description
I have a situation that seems unexpected to me. I have a query with 'keepUnusedDataFor' set to 30 minutes (the length of something expiring in the API). I also have 'refetchOnFocus: true' set for my whole API, but disabled for this specific query.
If I keep focus on the window, the token lasts in cache like I want despite no subscriptions to it. However, if I lose focus and later (within the 30 minutes) regain focus, my value is cleared out of cache. No new fetch is done, as expected, but losing the value on focus is not what I intend.
Is this a bug, or is there something I'm not configuring correctly?
The query:
const [getSshCreds, sshCreds] = useLazyGetSshConnectionQuery({
refetchOnFocus: false,
refetchOnReconnect: false,
});