René's URL Explorer Experiment


Title: fix(rpc): honor automatic client caching by SaKaNa-Y · Pull Request #430 · devframes/devframe · GitHub

Open Graph Title: fix(rpc): honor automatic client caching by SaKaNa-Y · Pull Request #430 · devframes/devframe

X Title: fix(rpc): honor automatic client caching by SaKaNa-Y · Pull Request #430 · devframes/devframe

Description: ImportantPlease take a moment to read this. Thank you! I should include a brief explanation of the problem in my own words in every PR. If that explanation is missing, please @mention me and do not merge this PR until I have added it. You may also leave this PR unaddressed (because this means I have not fulfilled my responsibilities as the author). If my explanation is unclear or difficult to follow, please ask me to clarify or provide reproduction steps or supporting evidence. I welcome suggestions and counterarguments, especially questions about anything I may have overlooked. (Your feedback helps me learn and improve. 🙏) I hold myself to this standard for every PR, regardless of its size. Summary Enabling cacheOptions: true does not prevent repeated server execution for identical RPC calls. This affects static functions and queries declared with cacheable: true. The client creates a cache with an empty function list but never loads the server declarations. As a result, no function qualifies for automatic caching. This change lets the client request eligible function names from an authenticated server endpoint before sending a call. It then caches results by function name and arguments. Static functions and opted-in queries use the cache, while actions and events continue to execute. Explicit function lists and custom serializers remain supported. Same query, same arguments, two calls: Before: server executes twice After: server executes once; the second call returns the cached result The client clears cached results when declarations, connection status, or trust change, and when it closes. The server can also broadcast invalidation after data changes. Late responses cannot restore invalidated cache entries. Servers without the discovery endpoint continue to serve uncached calls. The change also handles timeouts while the client discovers cacheable functions. If invalidation triggers repeated discovery, expired calls stop before dispatch. This prevents an expired action from executing alongside a later retry. Calls already sent retain their existing timeout behavior. Failed discovery rejects waiting calls, and a later call retries discovery. Evidence These results come from the completed verification runs. Tests were not rerun for this description update. Browser reproduction: two identical calls execute twice with cacheOptions: true. An explicit function list returns the first result twice and executes the server function once. With the PR applied to the v1.2.3 source, all 28 cache regression tests pass. A separate consumer using the packed package passes all 46 checks across WebSocket and SSE. Coverage includes real authentication, disconnects, invalidation, late responses, discovery timeouts, and explicit cache lists. On that source plus the PR, lint, knip, typecheck, and build pass. The full test run reports 1686 passed, 13 skipped, and two failed export snapshots for @devframes/hub-ui-onboard. Both failures concern defaultMessages and also occur in the baseline CI run. Merge Danger Door: Two-way. This change can be reverted. Blast Radius: RPC caching. Automatic caching adds requests to discover eligible functions. Invalidation clears all cached results, including results cached through explicit function lists. The server must broadcast invalidation after changing data that cached queries read.

Open Graph Description: ImportantPlease take a moment to read this. Thank you! I should include a brief explanation of the problem in my own words in every PR. If that explanation is missing, please @mention me and do not...

X Description: ImportantPlease take a moment to read this. Thank you! I should include a brief explanation of the problem in my own words in every PR. If that explanation is missing, please @mention me and do not...

Opengraph URL: https://github.com/devframes/devframe/pull/430

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a47d0d76-101a-b1c3-2ad7-753c8cfa3859
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE8C6:18732E:159377D:1D7ADD4:6AFB7A5A
html-safe-nonce4eacbeedb8e4d031089362346f8f7734344eabd29341598100af2b2b24ef4951
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEM2OjE4NzMyRToxNTkzNzdEOjFEN0FERDQ6NkFGQjdBNUEiLCJ2aXNpdG9yX2lkIjoiNjk2Mzk5NDk1Nzc2MTQ0NDQ0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccebf525401f848625118b65181953cd5c499a83a83fd0254f79d4be39320dfee
hovercard-subject-tagpull_request:4741019467
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/devframes/devframe/pull/430/files
twitter:imagehttps://avatars.githubusercontent.com/u/185575200?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/185575200?s=400&v=4
og:image:altImportantPlease take a moment to read this. Thank you! I should include a brief explanation of the problem in my own words in every PR. If that explanation is missing, please @mention me and do not...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneef32892d4269fb87b55e81cc4ba8d86e0f16aa28446ffbf46cba8be5179ab188
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/devframes/devframe git https://github.com/devframes/devframe.git
octolytics-dimension-user_id279879373
octolytics-dimension-user_logindevframes
octolytics-dimension-repository_id1231722386
octolytics-dimension-repository_nwodevframes/devframe
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1231722386
octolytics-dimension-repository_network_root_nwodevframes/devframe
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasebc3703b4dcbe820d1284ef63c88b001c850be25e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/devframes/devframe/pull/430/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdevframes%2Fdevframe%2Fpull%2F430%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdevframes%2Fdevframe%2Fpull%2F430%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=devframes%2Fdevframe
Reloadhttps://github.com/devframes/devframe/pull/430/files
Reloadhttps://github.com/devframes/devframe/pull/430/files
Reloadhttps://github.com/devframes/devframe/pull/430/files
devframeshttps://github.com/devframes
devframehttps://github.com/devframes/devframe
Codehttps://github.com/devframes/devframe
Issues12 (12)https://github.com/devframes/devframe/issues
Pull requests13 (13)https://github.com/devframes/devframe/pulls
Actionshttps://github.com/devframes/devframe/actions
Security and qualityhttps://github.com/devframes/devframe/security
Insightshttps://github.com/devframes/devframe/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fdevframes%2Fdevframe%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fdevframes%2Fdevframe%2Fissues%2Fnew%2Fchoose
antfuhttps://github.com/antfu
devframes:mainhttps://github.com/devframes/devframe/tree/main
SaKaNa-Y:fix/automatic-rpc-cachehttps://github.com/SaKaNa-Y/devframe/tree/fix/automatic-rpc-cache
Conversation 3 https://github.com/devframes/devframe/pull/430
Commits 4 https://github.com/devframes/devframe/pull/430/commits
Checks 12 https://github.com/devframes/devframe/pull/430/checks
Files changed https://github.com/devframes/devframe/pull/430/files
Please reload this pagehttps://github.com/devframes/devframe/pull/430/files
fix(rpc): honor automatic client caching https://github.com/devframes/devframe/pull/430/files#top
Show all changes 4 commits https://github.com/devframes/devframe/pull/430/files
b7ef5b9 fix(rpc): honor automatic client caching SaKaNa-Y Oct 5, 2026 https://github.com/devframes/devframe/pull/430/commits/b7ef5b99d4172b11f5410ab43353f9ab2fc1b0fd
f6ae3e6 fix(rpc): retry cache discovery after failures SaKaNa-Y Oct 7, 2026 https://github.com/devframes/devframe/pull/430/commits/f6ae3e665def22aa9c60aa8ba442d526b369b198
0fa73c0 fix(rpc): stop expired calls before cache discovery dispatch SaKaNa-Y Oct 7, 2026 https://github.com/devframes/devframe/pull/430/commits/0fa73c09a88286816f22bd895a7f3a7724665563
2cbbee2 Merge branch 'main' into fix/automatic-rpc-cache antfu Oct 13, 2026 https://github.com/devframes/devframe/pull/430/commits/2cbbee2b440fae90505110df7f3d6144d88a8402
Clear filters https://github.com/devframes/devframe/pull/430/files
Please reload this pagehttps://github.com/devframes/devframe/pull/430/files
Please reload this pagehttps://github.com/devframes/devframe/pull/430/files
11.client.md https://github.com/devframes/devframe/pull/430/files#diff-2e580975244ee1a0e104832dc30df73b97328d231ae28a30088cb5829938a59e
3.events.md https://github.com/devframes/devframe/pull/430/files#diff-e690d18d47be4175f8635254e7bdf62c3701b3a0465b7f6691e0988646ca34cd
rpc-cache.test.ts https://github.com/devframes/devframe/pull/430/files#diff-defff4a6bdaef793e2dac4b73883ab537cb8611f6b8e69595b21a3135825e446
rpc.ts https://github.com/devframes/devframe/pull/430/files#diff-d2f50629699c7a154f80b1979fad124883645a33b43275f0e494b0cf8c232da0
events.ts https://github.com/devframes/devframe/pull/430/files#diff-3b2cc3e5583c447eb874f44080449b916076311e910d379822b5c6c031544be9
host-functions.ts https://github.com/devframes/devframe/pull/430/files#diff-efe5456b93a0d8e8247cfe6e91892c36dd7212a914553773de1fbee22d4626be
rpc-augments.ts https://github.com/devframes/devframe/pull/430/files#diff-0135bad2e2bf47805db160f6e9daf5a631a5d5362f3bb793cc546e021f672378
constants.snapshot.d.ts https://github.com/devframes/devframe/pull/430/files#diff-bddb4fcefc094b14796fa96b28e6183fded7aabd2d1185f22b993a3297567ee0
index.snapshot.d.ts https://github.com/devframes/devframe/pull/430/files#diff-e36c6d402239a03e9a6e3a7c285d18780f3584e9dd275c7e5220a6fc41fb160d
docs/content/1.guide/11.client.mdhttps://github.com/devframes/devframe/pull/430/files#diff-2e580975244ee1a0e104832dc30df73b97328d231ae28a30088cb5829938a59e
View file https://github.com/SaKaNa-Y/devframe/blob/2cbbee2b440fae90505110df7f3d6144d88a8402/docs/content/1.guide/11.client.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/430/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/430/files#diff-2e580975244ee1a0e104832dc30df73b97328d231ae28a30088cb5829938a59e
https://github.com/devframes/devframe/pull/430/files#diff-2e580975244ee1a0e104832dc30df73b97328d231ae28a30088cb5829938a59e
docs/content/8.references/3.events.mdhttps://github.com/devframes/devframe/pull/430/files#diff-e690d18d47be4175f8635254e7bdf62c3701b3a0465b7f6691e0988646ca34cd
View file https://github.com/SaKaNa-Y/devframe/blob/2cbbee2b440fae90505110df7f3d6144d88a8402/docs/content/8.references/3.events.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/430/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/430/files#diff-e690d18d47be4175f8635254e7bdf62c3701b3a0465b7f6691e0988646ca34cd
https://github.com/devframes/devframe/pull/430/files#diff-e690d18d47be4175f8635254e7bdf62c3701b3a0465b7f6691e0988646ca34cd
packages/devframe/src/client/rpc-cache.test.tshttps://github.com/devframes/devframe/pull/430/files#diff-defff4a6bdaef793e2dac4b73883ab537cb8611f6b8e69595b21a3135825e446
View file https://github.com/SaKaNa-Y/devframe/blob/2cbbee2b440fae90505110df7f3d6144d88a8402/packages/devframe/src/client/rpc-cache.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/430/{{ revealButtonHref }}
Please reload this pagehttps://github.com/devframes/devframe/pull/430/files
Please reload this pagehttps://github.com/devframes/devframe/pull/430/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.