diff --git a/frontend/components/dashboard/scan-terminal/__tests__/stableServerRefreshPolicy.test.ts b/frontend/components/dashboard/scan-terminal/__tests__/stableServerRefreshPolicy.test.ts index 902ccdc9..4233a917 100644 --- a/frontend/components/dashboard/scan-terminal/__tests__/stableServerRefreshPolicy.test.ts +++ b/frontend/components/dashboard/scan-terminal/__tests__/stableServerRefreshPolicy.test.ts @@ -20,6 +20,7 @@ export function runTests() { "dashboard", "ScanTerminalDashboard.tsx", ); + const dashboardClientPath = path.join(projectRoot, "lib", "dashboard-client.ts"); const airportEvidencePath = path.join( projectRoot, "components", @@ -30,6 +31,7 @@ export function runTests() { const querySource = fs.readFileSync(queryPath, "utf8"); const dashboardSource = fs.readFileSync(dashboardPath, "utf8"); + const dashboardClientSource = fs.readFileSync(dashboardClientPath, "utf8"); const airportEvidenceSource = fs.readFileSync(airportEvidencePath, "utf8"); assert( @@ -49,4 +51,8 @@ export function runTests() { !airportEvidenceSource.includes("busan:"), "airport evidence must only expose configured focused runways, not all runway observations", ); + assert( + dashboardClientSource.includes('CACHE_KEY = "polyWeather_v2_chart_full_day"'), + "city detail cache key must be bumped so old partial chart detail caches are not reused", + ); } diff --git a/frontend/lib/dashboard-client.ts b/frontend/lib/dashboard-client.ts index 3b542e8a..f422f674 100644 --- a/frontend/lib/dashboard-client.ts +++ b/frontend/lib/dashboard-client.ts @@ -15,7 +15,7 @@ import { } from "@/lib/backend-api"; import { formatHttpErrorMessage } from "@/lib/http-error"; -const CACHE_KEY = "polyWeather_v1"; +const CACHE_KEY = "polyWeather_v2_chart_full_day"; const CACHE_TTL_MS = 30 * 60 * 1000; const SCAN_TERMINAL_CLIENT_TIMEOUT_MS = 35_000; const CITY_DETAIL_CLIENT_TIMEOUT_MS = 35_000;