You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question about React Native and cache. I have set the cacheLife option to enable the cache. Even if the value is set, there is always a network request made.
But, if I enable debugging in the app with for example React Native Debugger and enable Network Inspect, the cache mechanism seems to work like it should. The data is cached for the amount of time set in the options. But as soon as I disable the debugger, nothing is cached again.
I'm using a Provider to set the url and the options: <Provider url={API_URL} options={options}> {children} </Provider>
Setting up with useFetch: const { get, post, response, loading, error } = useFetch(API_URL);
Activity