Skip to content

theresa-de-ocampo/tan-stack-query-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning TanStack Query

staleTime vs cacheTime

Stale Time: The duration until a query transitions from fresh to stale. As long as the query is fresh, data will always be read from the cache - no network requests will happen! If the query is stale (which per default is instantly), you will still get data from the cache, but a background refresh can happen under certain conditions.

Cache Time: The duration until inactive queries will be removed from the cache. This defaults to 5 minutes. Queries transition to the inactive state as soon as there are no observers registered, so when all components which use the query have unmounted.

Read More About Caching

About

Learning TanStack Query

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published