Skip to content

feat(vue): support query-scoped soft invalidation - #858

Merged
patroza merged 4 commits into
effect-app:mainfrom
patroza:perf/soft-work-invalidation
Aug 10, 2026
Merged

feat(vue): support query-scoped soft invalidation#858
patroza merged 4 commits into
effect-app:mainfrom
patroza:perf/soft-work-invalidation

Conversation

@patroza

@patroza patroza commented Aug 10, 2026

Copy link
Copy Markdown
Member

Why

Repository-derived invalidation currently makes every command await every affected query. Some page-level consumers are soft-fresh summaries where background refresh is sufficient; making a command wait for them adds non-critical latency.

What

Adds an invalidation: "soft" query option. The default remains "await". Mutation invalidation starts soft refetches without awaiting settlement while retaining the existing await-until-fresh contract for strict consumers.

How

Query subscriptions register their requirement by full cache key for both Atom and TanStack engines. If multiple active consumers share a key, the strictest requirement wins: one default/"await" subscriber makes the invalidation awaited; a key is soft only when every active subscriber opts into soft behavior. Includes a focused registry test and an @effect-app/vue patch changeset.

Remarks

No application resource names or policies live in the library. Consumer: macs-holding/scanner#2204.

@patroza patroza changed the title perf(vue): soft-invalidate Work queries feat(vue): support query-scoped soft invalidation Aug 10, 2026
@patroza
patroza marked this pull request as ready for review August 10, 2026 19:02
@patroza
patroza merged commit 0fa0e80 into effect-app:main Aug 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant