Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve 2011 #2040

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/live-query/cache/cache-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ export const cacheMiddleware: Middleware<DBCore> = {
if (
primKey.outbound || // Non-inbound tables are harded to apply optimistic updates on because we can't know primary key of results
trans.db._options.cache === 'disabled' || // User has opted-out from caching
trans.explicit // It's an explicit write transaction being made. Don't affect cache until transaction commits.
trans.explicit || // It's an explicit write transaction being made. Don't affect cache until transaction commits.
trans.idbtrans.mode !== 'readwrite' // We only handle 'readwrite' in our transaction override. 'versionchange' transactions don't use cache (from populate or upgraders).
) {
// Just forward the request to the core.
return downTable.mutate(req);
Expand Down
Loading