Skip to content

SQLite WASM Cache persistence is flaky #347

@leon-wbr

Description

@leon-wbr

I've implemented a fairly intricate way of fetching all of our data, which includes a few tens of thousands of notes that need to be available at once, in a worker that runs in the background. My idea was to have it fetch the notes, persist them to the cache, send them to the frontend to load asynchronously and on the subsequent visits, the cache will continue to be used.

It seems that this works, sometimes. I haven't figured out what makes it persists – or what makes it fail. There are no errors. My theory is that either the query or the persistence of the database to IndexedDB is taking too long, and it will only persist if the user stays in the app for long enough to have it succeed.

I'd be glad if someone knows why this happens, or if there is a better way to solve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions