-
Imagine there is a collaborative document (document owner and a collaborator) and if the document owner allows the collaborator to read and write to the document at the beginning. The collaborator will be able to read and write to the document as we expected when he first access it and have it cached locally (via indexdbPersistence). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@Alecyrus my understanding is no the changes will not be discarded just not accepted by the server, the user will just have changes the server doesn't that it loads from indexeddb. AFAIK HocusPocus does not do any replace operations whatsoever on the client. It only ever adds updates. You would need to implement something that manually deletes the indexeddb copy and replaces it with the server copy if authentication fails. I do something similar to expire documents on the server over time (remove their history as they grow large) and invalidate the clients copy after. |
Beta Was this translation helpful? Give feedback.
@Alecyrus my understanding is no the changes will not be discarded just not accepted by the server, the user will just have changes the server doesn't that it loads from indexeddb.
AFAIK HocusPocus does not do any replace operations whatsoever on the client. It only ever adds updates.
You would need to implement something that manually deletes the indexeddb copy and replaces it with the server copy if authentication fails.
I do something similar to expire documents on the server over time (remove their history as they grow large) and invalidate the clients copy after.