mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 21:56:18 -08:00
fix(server-storage): apply a caller's edits to the cache as it is now
ServerUserDataStorage remembers the map getItem handed out. When the cache changed since (another tab saved, a re-read), a write applies only the entries the caller changed to the current cache, so a map read before another tab's save no longer reads as deleting that save. The cache moves into UserDataCache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2a93100ec4
commit
70fabb1424
4 files changed
+182
-82
No files matched your search
@@ -203,7 +203,9 @@ settings and guards read them in every build.
|
||||
the four synced namespaces are cached under the `iptvnator-server:` key
|
||||
prefix (the legacy unprefixed keys are never written in server mode) and
|
||||
each change sends only the playlist entries that differ, debounced, with a
|
||||
`keepalive` flush when the page hides. Batches go out one after another
|
||||
`keepalive` flush when the page hides. A change is compared with the map
|
||||
the caller read: when the cache changed since (another tab, a re-read),
|
||||
only the entries the caller changed are applied to it. Batches go out one after another
|
||||
(the page-hide flush waits for a batch still travelling), a failed write,
|
||||
including a refused `keepalive` one, stays queued for the next flush, and
|
||||
every unconfirmed write (queued or travelling) is saved in `localStorage`
|
||||
|
||||
Reference in new issue
Block a user