mirror of
https://github.com/caty21/forex-dashboard.git
synced 2026-07-27 20:37:45 +00:00
feat: onglet Marchés + TvMiniChart sans popup + cache RP 48h + OIS default
- page.tsx: onglet '🌍 Marchés' — S&P 500, VIX, DXY, Or (TvMiniChart 2x2) - TvChart: prop dateRange configurable sur TvMiniChart (défaut 1M) - ReportTab: TvAdvancedChart → TvMiniChart (plus de popup TV), Or remplace US10Y S&P 500/VIX dateRange=12M (daily), DXY/Or dateRange=60M (weekly) - rateprobability: cache TTL 4h → 48h (OIS revient même sans GitHub Actions hourly) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -237,7 +237,7 @@ function loadCachedRPBody(ccy: string, slug: string): Record<string, unknown> |
|
||||
const entry = parsed.data?.[ccy] as Record<string, unknown> | undefined;
|
||||
if (!entry) return null;
|
||||
const ageMs = Date.now() - new Date(parsed.fetchedAt).getTime();
|
||||
if (ageMs > 4 * 60 * 60 * 1000) { // ignore si > 4h
|
||||
if (ageMs > 48 * 60 * 60 * 1000) { // ignore si > 48h (GitHub Actions peut ne pas tourner quotidiennement)
|
||||
console.warn(`[rate-prob] cache stale (${Math.round(ageMs / 3600000)}h), skipping`);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user