API being called on page mount every time despite having stale and cache values of 5 minutes #9734
Unanswered
alimurad-1
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @ALL, I have been working on a react native expo project and I have cached an api with gcTime of 10 minutes and staleTime of 5 minutes. I am adding the relevant components
//useAgentProfile.tsx
The keys do not change on page mount, stale is false, and data exists in cache. I've verified it using following consoles
Cache for query key: ["agent", "profile", 'a number here']
Cached data: true
Is data stale?: false
Data updated at: 10/6/2025, 6:53:46 PM
what are the common troubleshooting steps or some common beginners mistakes that I might be making.
Beta Was this translation helpful? Give feedback.
All reactions