T
TanStack17mo ago
xenial-black

Difference between gcTime and staleTime ?

:)
4 Replies
extended-salmon
extended-salmon17mo ago
Read the documentation
conscious-sapphire
conscious-sapphire17mo 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
conscious-sapphire
conscious-sapphire17mo 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...
conscious-sapphire
conscious-sapphire17mo ago
i hope this helps

Did you find this page helpful?