Cachebust json files.

This commit is contained in:
Joshua Bemenderfer 2022-01-05 21:55:13 -05:00
parent a6942047db
commit 87541f030d
10 changed files with 10 additions and 10 deletions

View File

@ -15,7 +15,7 @@ const store = {
}
async function refreshData() {
store.data.value = await fetch(`/data/overall/cases/by-county/${store.parameters.value.county}.json`).then(res => res.json())
store.data.value = await fetch(`/data/overall/cases/by-county/${store.parameters.value.county}.json?cachebust=${Date.now()}`).then(res => res.json())
// Annoyingly complicated way to reset the end date to the most recent report date.
if (formatDate(end) === formatDate(new Date())) {

View File

@ -5,7 +5,7 @@ const store = {
}
async function refreshData() {
store.data.value = await fetch(`/data/overall/cases/combined.json`).then(res => res.json())
store.data.value = await fetch(`/data/overall/cases/combined.json?cachebust=${Date.now()}`).then(res => res.json())
}
if (globalThis.window) refreshData()

View File

@ -15,7 +15,7 @@ const store = {
}
async function refreshData() {
store.data.value = await fetch(`/data/overall/deaths/by-county/${store.parameters.value.county}.json`).then(res => res.json())
store.data.value = await fetch(`/data/overall/deaths/by-county/${store.parameters.value.county}.json?cachebust=${Date.now()}`).then(res => res.json())
// Annoyingly complicated way to reset the end date to the most recent report date.
if (formatDate(end) === formatDate(new Date())) {

View File

@ -5,7 +5,7 @@ const store = {
}
async function refreshData() {
store.data.value = await fetch(`/data/overall/deaths/combined.json`).then(res => res.json())
store.data.value = await fetch(`/data/overall/deaths/combined.json?cachebust=${Date.now()}`).then(res => res.json())
}
if (globalThis.window) refreshData()

View File

@ -15,7 +15,7 @@ const store = {
}
async function refreshData() {
store.data.value = await fetch(`/data/overall/hospitalizations/by-county/${store.parameters.value.county}.json`).then(res => res.json())
store.data.value = await fetch(`/data/overall/hospitalizations/by-county/${store.parameters.value.county}.json?cachebust=${Date.now()}`).then(res => res.json())
// Annoyingly complicated way to reset the end date to the most recent report date.
if (formatDate(end) === formatDate(new Date())) {

View File

@ -5,7 +5,7 @@ const store = {
}
async function refreshData() {
store.data.value = await fetch(`/data/overall/hospitalizations/combined.json`).then(res => res.json())
store.data.value = await fetch(`/data/overall/hospitalizations/combined.json?cachebust=${Date.now()}`).then(res => res.json())
}
if (globalThis.window) refreshData()

View File

@ -15,7 +15,7 @@ const store = {
}
async function refreshData() {
store.data.value = await fetch(`/data/overall/testing/by-county/${store.parameters.value.county}.json`).then(res => res.json())
store.data.value = await fetch(`/data/overall/testing/by-county/${store.parameters.value.county}.json?cachebust=${Date.now()}`).then(res => res.json())
}
watch(() => store.parameters.value.county, () => {

View File

@ -14,7 +14,7 @@ const store = {
}
async function refreshData() {
store.data.value = await fetch(`/data/risk/age/age.json`).then(res => res.json())
store.data.value = await fetch(`/data/risk/age/age.json?cachebust=${Date.now()}`).then(res => res.json())
// Annoyingly complicated way to reset the end date to the most recent report date.
if (formatDate(end) === formatDate(new Date())) {

View File

@ -5,7 +5,7 @@ const store = {
}
async function refreshData() {
store.data.value = await fetch(`/data/risk/health-conditions/health-conditions.json`).then(res => res.json())
store.data.value = await fetch(`/data/risk/health-conditions/health-conditions.json?cachebust=${Date.now()}`).then(res => res.json())
}
if (globalThis.window) refreshData()

View File

@ -5,7 +5,7 @@ const store = {
}
async function refreshData() {
store.data.value = await fetch(`/data/summary.json`).then(res => res.json())
store.data.value = await fetch(`/data/summary.json?cachebust=${Date.now()}`).then(res => res.json())
}
if (globalThis.window) refreshData()