docStore

val docStore: DocStore? = null

Backing store for offline local persistence. When set, attachDocument resumes a previously Document.toBytes-persisted envelope before contacting the server, and the document is persisted again on every local change, local presence change, and successful sync. Unset (the default) disables persistence entirely — no load, no lease, no writes.

You must also set key to an opaque random value the app mints once and reuses across launches. Both the store keys and the actor the recovery is keyed by are derived from it, and the default is a fresh random key per Client, so leaving it unset means every restart silently loses every un-pushed change and orphans the previous launch's entries. This cannot be defaulted correctly — only the app knows what identity should outlive the process — so the constructor warns rather than guessing (init {}). See key for why the value must not be a user id, a device id, or anything else guessable or shared between users of one device.

Ported from JS client.ts's store option (2291bf67/#1338); the key-pairing requirement and the constructor warning are from the rewritten JSDoc (3b9c668c/#1402).