You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The solution does wipe the cache on reopen. Ongoing live queries will not be triggered at the time of database deletion, but rather at the time when a database has been created. In case a database is deleted and then recreated, the cache will be wiped out on successful open and the ongoing queries will be retriggered.
A deletion without reopening the database will leave ongoing live queries as they are. If they are retriggered for another reason (state update in app etc), they might auto-open the database and get the results from a recreated database.
If app code wants to delete database and force it to not reopen automatically, application code must do both db.close() and db.delete(). All queries after that will then fail with database closed error, but not immediately and only if a liveQuery is triggered from a non-dexie reason such as a state update.
If components are live-querying data and an action does Dexie.delete(database) or db.delete(), the optimistic cache isn't wiped out.
See #1689 (comment)
The text was updated successfully, but these errors were encountered: