mirror of
https://github.com/Open-Dev-Society/OpenStock.git
synced 2026-11-17 05:51:02 +08:00
Production went over Fluid Active CPU (11h of 4h on the free plan) with 717K
function invocations out of 880K CDN requests: almost nothing was cached.
Every public page (/, /s, 518 /s/[ticker], /compare/*, robots, sitemap) was
force-dynamic or read the session in the marketing layout, so every crawler
hit and every <Link> prefetch was a render plus a MongoDB connection.
- Marketing layout, home and /s/[ticker]: no session read. The header shows
Sign in / Get started for everyone; the auth layout already sends a
signed-in visitor to /dashboard.
- /s/[ticker]: ISR for a day (generateStaticParams [] = cached on first
visit); /compare/[slug] built ahead.
- robots.txt, sitemap.xml: ISR for a day instead of force-dynamic.
- /s: prefetch={false} on the 518-link directory.
- EDGAR submissions JSON (~160 KB, 20 ISR units) no longer goes into the
Data Cache; the page ISR holds the parsed result.
- middleware runs only on /dashboard, /watchlist, /profile, /stocks.
- Yahoo daily quotes follow the quote TTL: hourly in cached mode (was 5 min).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>