Root baseof: drop caching of scripts.html - #2787
Merged
chalin merged 2 commits intoSep 2, 2026
Merged
Conversation
- partialCached with no variant caches the first execution site-wide, so Store-gated scripts (mermaid, katex) keyed off whichever page rendered first; the root baseof was the only caller still cached (docs/blog/swagger baseofs use plain partial) - Pins the fix with a fixture test: one mermaid page among plain root-baseof siblings (red before the fix)
chalin
marked this pull request as ready for review
September 2, 2026 11:52
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.
partialCached "scripts.html" .with no variant key assumes page-invariant output, but the Store-gated script emission (mermaid, katex) made the output page-dependent: the cache serves the first-rendered page's script set to every page. The docs, blog, and swagger baseofs already call plainpartial; the root baseof carried the last cached call.partial. The optimization buys little (the partial is a few conditionals and script elements) and cannot be safe without a discriminating cache variant.main, the first-rendered page's script set was served site-wide; with the change, each page ships only what its own flags gate. Full repo test suite green.baseof.htmlkeeps the cached call in its copy; candidate for the 0.18.0 upgrade post's override-review callouts.