T
TanStack8mo ago
wise-white

staleTime vs. preloadStaleTime

Hi. What's the difference between these to in terms of caching? I have a loader in my route component. If the preloadStaleTime is for the loader, what does staleTime affects?
3 Replies
other-emerald
other-emerald8mo ago
They behave differently based on how they are triggered
wise-white
wise-whiteOP8mo ago
Just as I thought. Thanks!
other-emerald
other-emerald8mo ago
Preloads are not always used So they have a 30 second stale time by default I think But normal loads are 0 Same default as query

Did you find this page helpful?