How to Clear React-Native Cache

How to clear all react-native cache on Windows, and where are the files?

you can try below command to clear cache of npm packager from window.

del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache

Check here,

hope this will work for you :)

How to clear API cache in react native app programmatically

You can set a header Cache-Control like this:

return fetch(url, {
headers: {
'Cache-Control': 'no-cache, no-store, must-revalidate',
'Pragma': 'no-cache',
'Expires': 0
}
}).then(function (res) {
return res.json();
}).catch(function(error) {
console.warn('Request Failed: ', error);
});

Reset png cache in react native

My problem was solved by resetting the react native cache with the command:

npm start -- --reset-cache

How can I clean (reset cache) of React Native using Expo. Not sure if it is cache issue

expo r -c

According to this forum post from an Expo dev, that's the command to start it cache clean

EDIT: They have changed it from exp r -c to expo start -c



Related Topics



Leave a reply



Submit