From d7dd3f9de51676d7494e588e39d01690dd815519 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 21 Aug 2026 23:55:33 +0200 Subject: [PATCH] Weltkueche: Cache-Busting (no-store) fuer die Daten-Fetches im Spiel Damit das Spiel nach einem Deploy nie eine gecachte dishes/production-matrix zeigt (gleiche Klasse Fix wie im Admin-Tool). Co-Authored-By: Claude Opus 4.8 --- App/sims/weltkueche/game.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/App/sims/weltkueche/game.html b/App/sims/weltkueche/game.html index aa3f56a..398b506 100644 --- a/App/sims/weltkueche/game.html +++ b/App/sims/weltkueche/game.html @@ -519,11 +519,12 @@ window.playSfx = playSfx; async function loadWeltkuecheData() { const base = (window.WK_BASE || './'); + const _nc = { cache: 'no-store' }; // frische Daten nach Deploy — kein gecachtes JSON const [dishesJ, countriesFull, prodMatrix, transportJ] = await Promise.all([ - fetch(base + 'assets/data/dishes.json').then(r => r.json()), - fetch(base + 'assets/data/countries-full.json').then(r => r.json()), - fetch(base + 'assets/data/production-matrix.json').then(r => r.json()), - fetch(base + 'assets/data/transport.json').then(r => r.json()).catch(() => ({})), + fetch(base + 'assets/data/dishes.json', _nc).then(r => r.json()), + fetch(base + 'assets/data/countries-full.json', _nc).then(r => r.json()), + fetch(base + 'assets/data/production-matrix.json', _nc).then(r => r.json()), + fetch(base + 'assets/data/transport.json', _nc).then(r => r.json()).catch(() => ({})), ]); // Länder-Map komplett aus countries-full ersetzen (überschreibt frühere inline-Defaults) Object.entries(countriesFull).forEach(([k, v]) => { C[k] = v; });