State Management · Senior · Question 53 of 75
What does persisting the TanStack Query cache (persistQueryClient) give you, and what must you watch out for?
- ✓Correct answer: Instant data after reload or offline; you must set
gcTimelong enough and bust the cache on schema/app version changes - 2Faster network requests
- 3Server-side caching
Explanation
Persisted queries older than their gcTime are discarded, and a buster string invalidates storage when the data shape changes. Never persist sensitive data unencrypted.