Skip to content

Fix Node server bundle cache collisions - #180

Closed
ItsM0rty wants to merge 1 commit into
plasmicapp:masterfrom
ItsM0rty:code-fix/loader-cache-keys
Closed

ItsM0rty wants to merge 1 commit into
plasmicapp:masterfrom
ItsM0rty:code-fix/loader-cache-keys

Conversation

@ItsM0rty

@ItsM0rty ItsM0rty commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Two loaders for the same projects can use the same Node server bundle cache entry even when their fetch options differ. For example, a loader with one translation prefix can read the bundle cached by a loader with another prefix.

Include the API host, CDN host, Next.js app-router setting and translation prefix in the cache key. These options can change the bundle requested from the API.

Testing

  • Added regression tests for each option and a control for reading a bundle with matching options. The four new cases fail on the original code and pass with this change.
  • pnpm --filter @plasmicapp/loader-fetcher test (17 passed)
  • pnpm --filter @plasmicapp/loader-fetcher build:types
  • pnpm --filter @plasmicapp/loader-fetcher exec eslint src/fetcher.ts src/fetcher.test.ts

The regression tests mock the loader responses; they don't use a live Plasmic project.

@vercel

vercel Bot commented Nov 6, 2026

Copy link
Copy Markdown

@ItsM0rty is attempting to deploy a commit to the Plasmic Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@ItsM0rty

ItsM0rty commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

I have read, agree to, and hereby sign Plasmic's Individual Contributor License Agreement

@sampullman

Copy link
Copy Markdown
Contributor

Thanks! This was merged with some minor revisions in b500e26

@sampullman sampullman closed this Nov 12, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants