React Query
Answered
Sun bear posted this in #help-forum
Sun bearOP
I need simple answer about where React Query saves cache in which memory, and when we close tab, does this cache removed? or what happens when we have 2 tabs open does they use same
Answered by Clown
React Query stores cache in memory just means its creating a JavaScript object to store the cache.
5 Replies
React Query stores cache in memory just means its creating a JavaScript object to store the cache.
Answer
Obviously this object is stored in memory (RAM)
Hence react Query stores cache in memory
2 tabs wont share the cache. I'm pretty sure its per tab since its just JavaScript object.
However you can persist it i think in localstorage and stuff. I dont have experience in that tho, so you'll have to look that up yourself
However you can persist it i think in localstorage and stuff. I dont have experience in that tho, so you'll have to look that up yourself