mirror of
https://github.com/caty21/forex-dashboard.git
synced 2026-08-19 23:48:06 +00:00
feat: dashboard v8 — COT, FX Weekly, Report, TvChart, Sentiment, News
Ajout des onglets COT, Weekly Report, TvChart. Refonte Sentiment, News, Calendar, Drivers. Nouvelles API cot-history et fx-weekly. Intégration FinancialJuice. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e11d61eb4d
commit
1a2ea02b22
@@ -5,7 +5,7 @@ import type { NewsItem } from "@/lib/newsfeed";
|
||||
export type { NewsItem } from "@/lib/newsfeed";
|
||||
|
||||
let _cache: { data: NewsItem[]; ts: number } | null = null;
|
||||
const TTL = 30 * 60_000; // 30 min
|
||||
const TTL = 5 * 60_000; // 5 min — actualités fraîches
|
||||
|
||||
export async function GET() {
|
||||
if (_cache && Date.now() - _cache.ts < TTL) {
|
||||
@@ -17,6 +17,6 @@ export async function GET() {
|
||||
|
||||
return NextResponse.json(
|
||||
{ items, fetchedAt: new Date().toISOString() },
|
||||
{ headers: { "Cache-Control": "s-maxage=1800, stale-while-revalidate=3600" } }
|
||||
{ headers: { "Cache-Control": "s-maxage=300, stale-while-revalidate=600" } }
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user