c02c1aa62cf633e8096bf33a1a452d3d81580c9e
Hydrogen overview was 1.8-2.0s (3 full-table aggregations on 66K rows). With cache: cold 1 user/min eats the full query, all subsequent within 60s window return in ~10ms. Implementation: - New cache.ts with cached(key, loader) helper - Per-key in-flight de-duplication: concurrent requests share one loader - Each handler wrapped, cache key includes query params (e.g. "hydrogen/daily?range=last30&customer=external") - TTL 60s as requested Measured speedups: - hydrogen/overview: 1.96s → 12ms (165x) - hydrogen/daily: 270ms → 11ms (24x) - electric/overview: 93ms → 9ms (10x) - electric/monthly: 36ms → 9ms (4x) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
羚牛 BI 报表服务
Languages
TypeScript
99.9%