mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
The medications list and the compliance summary refetch on every mount, so a take or skip logged on another device shows on return (#316). The nav link's hover / touch / focus intent and the route-commit preload prefetch both reads too, so every visit through a link sent each of them twice: the prefetch, then the identical request from the mount a few hundred milliseconds after the first answer landed. The mount now skips its refetch only when the cached data answers a prefetch that went to the network for this visit: within the last 10 s, and since the route last left /medications. A direct load, a return with an older entry, or a quick return whose prefetch found the entry still fresh keep the refetch on mount.