Skip to content

feat: bypass Accounts API server cache after transaction confirmation - #10068

Draft
salimtb wants to merge 2 commits into
mainfrom
feat/assets-controller-bypass-cache-on-tx-confirmed
Draft

feat: bypass Accounts API server cache after transaction confirmation#10068
salimtb wants to merge 2 commits into
mainfrom
feat/assets-controller-bypass-cache-on-tx-confirmed

Conversation

@salimtb

@salimtb salimtb commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

The Accounts API keeps a 60s server-side cache keyed on the full URL, and WebSocket events do not invalidate it, so a refresh right after a transaction confirms can be answered with the pre-transaction snapshot. forceUpdate only skips the client-side query cache.

getAssets now accepts a bypassCache option; when set, AccountsApiDataSource asks the core-backend client to append a random cacheBuster query param (the mechanism sanctioned by the API team so these requests stay traceable in logs) and skip the client-side cache. The transaction-confirmed refresh passes it; the unapproved-transaction refresh intentionally does not, to keep cache misses rare.

Explanation

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

salimtb and others added 2 commits September 2, 2026 02:10
…action confirmation

The Accounts API keeps a 60s server-side cache keyed on the full URL, and
WebSocket events do not invalidate it, so a refresh right after a transaction
confirms can be answered with the pre-transaction snapshot. forceUpdate only
skips the client-side query cache.

getAssets now accepts a bypassCache option; when set, AccountsApiDataSource
asks the core-backend client to append a random cacheBuster query param
(the mechanism sanctioned by the API team so these requests stay traceable
in logs) and skip the client-side cache. The transaction-confirmed refresh
passes it; the unapproved-transaction refresh intentionally does not, to
keep cache misses rare.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@salimtb salimtb changed the title feat(assets-controller): bypass Accounts API server cache after transaction confirmation feat: bypass Accounts API server cache after transaction confirmation Sep 2, 2026
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