Skip to content
Discussion options

You must be logged in to vote

My expectation is that after my api returns data for a given query key, that react-query won't hit my api again for that same query key for at least some period of time.

this is what staleTime is for. I’ve written about the difference between staleTime and cacheTime here: https://tkdodo.eu/blog/practical-react-query#the-defaults-explained

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@captainR0bbo
Comment options

@TkDodo
Comment options

@captainR0bbo
Comment options

@mrmartineau
Comment options

@TkDodo
Comment options

Answer selected by captainR0bbo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants