Using react query differently in online and offline mode

43 Views Asked by At

I'm using react query in my react native app with the following configuration : Stale Time = 3 minutes Cache Time = 5 minutes But the problem is that i need to get data from cache if there is no internet even if 24 hours passed. But with my configuration data is being deleted from cache After 5 minutes. I need to keep this configuration for online mode but if there is no internet i want to to keep data and get it from cache. Please any solution for this Thanks

0

There are 0 best solutions below