fix: add MF remote cache invalidation via buildHash and manifest freshness#353
Open
swalker326 wants to merge 2 commits into
Open
fix: add MF remote cache invalidation via buildHash and manifest freshness#353swalker326 wants to merge 2 commits into
swalker326 wants to merge 2 commits into
Conversation
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected -t build --skipRemoteCache |
❌ Failed | 45s | View ↗ |
nx affected -t test |
✅ Succeeded | 1m 41s | View ↗ |
nx affected -t lint |
✅ Succeeded | 5s | View ↗ |
nx affected --exclude=!libs/** -t build --skipR... |
✅ Succeeded | 14s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-02-11 13:26:12 UTC
- Runtime plugin: append ?_t=<timestamp> to manifest fetch URL for SSR/Node.js compatibility where fetch cache option is ignored - Runtime plugin: append ?v=<manifest.timestamp> to remote entry URLs so MF runtime treats each new build as a distinct remote (timestamp changes every build, unlike remote_entry_url which stays stable for tag/env deploys) - Runtime plugin: always re-resolve processedRemotes from fresh manifest - Skip cache-buster on session storage overrides (local dev)
4045a9f to
27e2c32
Compare
ryok90
previously approved these changes
Feb 11, 2026
…rewriting The worker now appends ?_zv=<snapshot_id> to remote_entry_url values in zephyr-manifest.json at serve time, so the client-side ?v=timestamp param is no longer needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
buildHashfield toZephyrManifestinterface for cache-bustingbuildHash(SHA-256 of sorted remote_entry_urls) during manifest creationcache: 'no-cache'+ timestamp query param for SSR compatibility?v=<buildHash>to remote entry URLs so MF runtime treats each new build as a distinct remoteRelated PRs (common branch
fix/mf-cache-invalidation-live-reload)bypassCache: trueonchrome.tabs.reload()Problem
Module Federation's runtime caches loaded remotes by URL. When a new version is deployed, the remote entry URL doesn't change (same path, new content), so MF serves the cached old version. The runtime plugin's in-memory manifest cache (
window.__ZEPHYR_MANIFEST_CACHE__) also prevents re-fetching updated manifests.Changes
libs/zephyr-edge-contract/src/lib/zephyr-manifest.tsbuildHash?: stringtoZephyrManifestlibs/zephyr-agent/src/lib/transformers/ze-create-manifest.tslibs/zephyr-xpack-internal/src/xpack-extract/runtime-plugin.tscache: 'no-cache'+?_t=on manifest fetch,?v=buildHashon remote URLs, always re-resolve remotesBackward Compatibility
buildHashis optional — old manifests without it still work (no query param appended)cache: 'no-cache'still allows 304 responses — no performance regression