Skip to content

Conversation

@gnoff
Copy link
Contributor

@gnoff gnoff commented Jul 8, 2025

bound args need to be encrypted for use cache functions and currently we track the read slightly later than will be necessary when we sync the latest React. This change moves the tracking to be as early as possible (as soon as the input signal is aborted or when the bound args are finished being serialized, whichever is first).


async function getUncachedData() {
await setTimeout(100)
await setTimeout(0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restoring these back to their intended timeout. Suspect that a prior fix to module loading tracking in dev made this possible


async function fetchUncachedData() {
await setTimeout(100)
await setTimeout(0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restoring these back to their intended timeout. Suspect that a prior fix to module loading tracking in dev made this possible

@gnoff gnoff requested a review from unstubbable July 8, 2025 17:15
@ijjk
Copy link
Member

ijjk commented Jul 8, 2025

Tests Passed

bound args need to be encrypted for use cache functions and currently we track the read slightly later than will be necessary when we sync the latest React. This change moves the tracking to be as early as possible (as soon as the input signal is aborted or when the bound args are finished being serialized, whichever is first).
@gnoff gnoff force-pushed the fix-cache-timeout branch from f5a920d to edf7698 Compare July 8, 2025 18:07
Comment on lines +136 to +137
// missing this cache fill. We use a idempotent function to only start reading once because
// it's also possible that streamToString finishes before the hangingInputAbortSignal aborts.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment has a minor grammatical error: "a idempotent function" should be "an idempotent function" since "idempotent" begins with a vowel sound.

Suggested change
// missing this cache fill. We use a idempotent function to only start reading once because
// it's also possible that streamToString finishes before the hangingInputAbortSignal aborts.
// missing this cache fill. We use an idempotent function to only start reading once because
// it's also possible that streamToString finishes before the hangingInputAbortSignal aborts.

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

@gnoff gnoff merged commit 656271b into vercel:canary Jul 8, 2025
235 of 241 checks passed
@gnoff gnoff deleted the fix-cache-timeout branch July 8, 2025 18:37
RobPruzan pushed a commit that referenced this pull request Jul 8, 2025
bound args need to be encrypted for use cache functions and currently we
track the read slightly later than will be necessary when we sync the
latest React. This change moves the tracking to be as early as possible
(as soon as the input signal is aborted or when the bound args are
finished being serialized, whichever is first).
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants