Files
OpenStock/components
ravixalgorithm 149199bc9c perf: shared Finnhub cache with timeouts, key pool and live quotes
- Every Finnhub call has a 5s timeout (a stalled socket held pages for 300s),
  at most 2 in flight per key, de-duplicated, stale-while-revalidate, and a 60s
  failure cool-down.
- FINNHUB_API_KEYS pool rotated per request, token sent as a header so cache keys
  are shared; falls back on 429.
- NEXT_PUBLIC_OPENSTOCK_DATA_MODE: cached (hourly, default) or realtime (15s).
- /api/quotes + useLiveQuotes for on-screen prices; honest freshness labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 15:28:19 +05:30
..