I'm doing the folloing request over a json file stored on an azure blob.
const getDatas = () => {
axios
.get('https://randomname.blob.core.windows.net/public/data_home_page.json')
.then(({ data }) => {
setStats(data)}
)
.catch((er) => console.log('error'))
}
I nested this function in a useEffect hook
useEffect(() => {
getDatas()
}, [])
It's working well as I can get the data and display it. My issue is that it's never refreshing at page/component render. The only solution is to clear cache.
How can I force the call to get fresh data withouth clearing all the user's cache ? And for a better understanding why does it go this way ?