Skip to content

Root baseof: drop caching of scripts.html - #2787

Merged
chalin merged 2 commits into
docsy:mainfrom
chalin:chalin-m24-partial-cached-fix-2026-0902
Sep 2, 2026
Merged

chalin merged 2 commits into
docsy:mainfrom
chalin:chalin-m24-partial-cached-fix-2026-0902

Conversation

@chalin

@chalin chalin commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator
  • Why: 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 plain partial; the root baseof carried the last cached call.
  • Change: revert to plain partial. The optimization buys little (the partial is a few conditionals and script elements) and cannot be safe without a discriminating cache variant.
  • Demonstration, via a throwaway fixture site (one mermaid page among plain root-baseof pages, not committed): on 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.
  • Site overrides: an override of the root baseof.html keeps the cached call in its copy; candidate for the 0.18.0 upgrade post's override-review callouts.

- 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 chalin added this to the 0.18.0 milestone Sep 2, 2026
@chalin chalin changed the title Fix per-page script gating: uncache the root baseof's scripts.html Root baseof: drop caching of scripts.html Sep 2, 2026
@chalin
chalin marked this pull request as ready for review September 2, 2026 11:52
@chalin
chalin merged commit 64f51c5 into docsy:main Sep 2, 2026
18 checks passed
@chalin
chalin deleted the chalin-m24-partial-cached-fix-2026-0902 branch September 2, 2026 11:52
chalin added a commit to chalin/docsy that referenced this pull request Sep 4, 2026
The four queued 0.18 lines (docsy#2780, docsy#2787, docsy#2788, docsy#2790) stay queued for a
CL-touching PR of their own; the release-prep coverage ledger keeps them as
todo.
chalin added a commit to chalin/docsy that referenced this pull request Sep 6, 2026
…he loop net

- Names Docsy 0.18 in the three legacy warnings; the version one states that a present legacy pin overrides the entry's
- Points the companion's empty-pin error at the theme-defaults merge, the likely cause
- Pins the entry env override, legacy-over-explicit-entry precedence, a map-valued legacy pin, and the name-derived floating id on a generic entry
- Moves the version ids and outcomes to the guide's Warnings, connects the author security rule to the field, and homes the entry-field rationale on the design page
- Drops the maintainer notes' partialCached caveat (stale since docsy#2787) and the changelog's PR cite (key issue suffices)
chalin added a commit to chalin/docsy that referenced this pull request Sep 6, 2026
…he loop net

- Names Docsy 0.18 in the three legacy warnings; the version one states that a present legacy pin overrides the entry's
- Points the companion's empty-pin error at the theme-defaults merge, the likely cause
- Pins the entry env override, legacy-over-explicit-entry precedence, a map-valued legacy pin, and the name-derived floating id on a generic entry
- Moves the version ids and outcomes to the guide's Warnings, connects the author security rule to the field, and homes the entry-field rationale on the design page
- Drops the maintainer notes' partialCached caveat (stale since docsy#2787) and the changelog's PR cite (key issue suffices)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant