T
TanStack2y ago
conscious-sapphire

Difference between gcTime and staleTime ?

:)
4 Replies
quickest-silver
quickest-silver2y ago
Read the documentation
harsh-harlequin
harsh-harlequin2y ago
gc time is when query cache is cxompletel cleared so its garbage collected no longer there staleTime means when to trigger refetch but cache is still there so staletime means how long do u wanna serve the cached data gc time is completely removing the key from cache garbage collection
harsh-harlequin
harsh-harlequin2y ago
Tiger's Place
gcTime in TanStack Query explained
Introduction I had a bit of a tough time understanding gcTime in TanStack Query. So I decided to write this post for myself. Every query is cached When you fetch data using Tanstack Query, the data is cached so that the following requests can be serv...
harsh-harlequin
harsh-harlequin2y ago
i hope this helps

Did you find this page helpful?