Refetch minimum duration?

I wish to always keep data up to date and I use
{
refetchOnMount: true,
refetchOnWindowFocus: true,
refetchOnReconnect: true,
}
{
refetchOnMount: true,
refetchOnWindowFocus: true,
refetchOnReconnect: true,
}
Is it possible to set a minimum elapsed time before this is triggered? Yes, refetch on alt-tab but only if last refetch was a minute ago? I dont want users to abuse my API
2 Replies
stanisław
stanisław•2y ago
staleTime @Shoodey
isaac_way
isaac_way•2y ago
👆 stale time = "How long before refetches can be triggered" cache time = "How long to keep data in the cache while no components using that data are mounted"
Want results from more Discord servers?
Add your server