Files
HealthLog/src/lib/queries/refetch-interval.ts
T
Marc-André BombeckandClaude Opus 4.8 50e0a65228 chore(release): v1.7.0
v1.7.0 — health-record export (PDF + FHIR), flexible medication schedules, first-paint dashboard snapshot, full HealthKit coverage, offline sync delta feed, Coach data clustering. See CHANGELOG.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 14:36:17 +02:00

16 lines
664 B
TypeScript

/**
* Shared client refetch cadence for the live dashboard / analytics
* surfaces.
*
* An open page (dashboard tile strip, Insights charts) polls its data
* source on this interval so freshly-synced Withings / HealthKit
* readings appear without a manual reload. The poll is backgrounded
* while the tab is hidden and never touches the LLM surfaces (those
* stay daily / pre-generated).
*
* The server-side dashboard-snapshot cache TTL is keyed off this value
* (see `src/app/api/dashboard/snapshot/route.ts`) so a scheduled
* refetch lands on a warm cache entry rather than a guaranteed miss.
*/
export const DASHBOARD_REFETCH_INTERVAL_MS = 120_000;