Commit 3bb47ac
authored
fix(bootstrap): reset cached tier timestamp when live data arrives with missing keys (koala73#2028)
Previously, fetchTier preserved the old IDB updatedAt when filling missing
keys from cache (source: mixed). This caused the stale timestamp to be
round-tripped back into IndexedDB on every load, making the CACHED banner
grow progressively staler (7h, 7h10m, 7h20m, ...) across sessions even
when live data was being fetched successfully.
Now the IDB is written with Date.now() and the in-memory tierState also
reflects the current time, so the brief pre-markBootstrapAsLive flash
shows "just now" instead of the preserved stale age.1 parent d2c8562 commit 3bb47ac
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
| 147 | + | |
149 | 148 | | |
150 | 149 | | |
151 | 150 | | |
| |||
0 commit comments