Skip to content

Commit

Permalink
Merge pull request #348 from kcarnold/bug/bust-cache
Browse files Browse the repository at this point in the history
Avoid caching remote schedule data. Add only this element to develop.
  • Loading branch information
NycoCC1993 authored Mar 11, 2024
2 parents 1a3f183 + 0ea888b commit a11b581
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export const useImportRemoteFile = () => {
const xlsxUrl = url.slice(xlsxIndex + getXLSXStr.length);
if (xlsxUrl !== "" && xlsxUrl !== fileUrl) {
setIsCSVLoading(true);
fetch(xlsxUrl)
// Avoid caching.
fetch(xlsxUrl, { cache: "no-store" })
.then((response) => {
if (response.status === 404) {
return null;
Expand Down Expand Up @@ -78,7 +79,8 @@ export const loadRemoteCSV = (url: string, csvIndex: number, appContext: AppCont
const csvUrl = url.slice(csvIndex + getCSVStr.length);
if (csvUrl !== "" && csvUrl !== fileUrl) {
setIsCSVLoading(true);
fetch(csvUrl)
// Avoid caching
fetch(csvUrl, { cache: "no-store" })
.then((response) => {
if (response.status === 404) {
return null;
Expand Down

0 comments on commit a11b581

Please sign in to comment.