Skip to content

Commit

Permalink
nit fixes cache issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin-pc committed Sep 30, 2024
1 parent f965997 commit 24120c8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/modules/config/remotes/urlRemote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ export const URLRemote: Remote<URLClient> = {
// Add a 10 second delay to simulate a slow network
// await new Promise((resolve) => setTimeout(resolve, 1000))
const remoteParams = remote as URLRemoteParams
const response = await fetch(remoteParams.url)
const response = await fetch(remoteParams.url, {
cache: 'no-store',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
},
})
const data = await response.json()

if (!data) {
Expand Down

0 comments on commit 24120c8

Please sign in to comment.