API reference › @evolu/common › local‑first/Evolu › LoadQueryOptions
Defined in: packages/common/src/local-first/Evolu.ts:1187
Options of Evolu.loadQuery.
Properties
cache?
readonly cache?: boolean;
Defined in: packages/common/src/local-first/Evolu.ts:1203
With false, the load skips the query's cached and pending loads and reads
the rows SQLite holds now: after the mutations this instance made before it
and the changes other tabs stored before it, so code holding a lock, such
as acquireLeaderLock, can check rows another tab wrote under the
same lock. It first sends the pending mutations as their own batch. Its
answer updates the cached rows and settled loads like any load's, and
pending loads keep their promises, which React Suspense relies on. On a
refused database it rejects with an UnknownError, the refusal itself
or one wrapping it, while cached loads stay pending. When the instance is
disposed before the answer, also by a deletion or removal of its database
in any tab, the load resolves with empty rows; code that decides on the
rows then checks isDatabaseDeleted, or its next call on the instance
throws.