Repository navigation
Commit cbe6ac9
committed
fix(data): persist write-refreshed values and update in-memory LRU on restore
Write replies that refresh on-screen reads called adopt() but never save(),
so confirmed values stayed out of persistent cache. After reload within the
fresh window the store showed pre-write data. Add the missing save() call
after adopt in confirm's refreshed-entry path, matching load() and adoptSeed().
Restoring an entry only pushed an updated lastUsed into the storage put list;
the in-memory metas map kept the previous timestamp, so purge() could evict
a just-restored value before older unused entries. Update metas in place so
purge sees the current session's access order.1 parent bba3ec8 commit cbe6ac9
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
330 | 334 | | |
331 | 335 | | |
332 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
| 976 | + | |
976 | 977 | | |
977 | 978 | | |
978 | 979 | | |
| |||
0 commit comments