TanStackT
TanStack2y ago
2 replies
wispy-yellow

Reset gcTime

I have a query that is only used for periodic mutations (essentially to keep a session alive). However, the query eventually gets garbage collected. Without setting gcTime to something too long or to infinity, is there a way I can reset gcTime during onSucess of my mutation? The useQueryClient hook is called by the onSucces handler. Thanks!
Was this page helpful?