- Fix auto-compile resetting to true on Typst page refresh: use a separate one-time marker key (autocompile_typst_default_set) so usePersistedState's remove-if-default optimisation no longer makes "off" indistinguishable from "never set" - Enable PDF content caching: generate output.pdfxref (via qpdf --show-xref) after every linearisation step in OutputCacheManager._copyFile, and set ENABLE_PDF_CACHING in k8s so OutputCacheManager actually delivers chunks - Add optional GS /ebook compression toggle in the Typst compile dropdown (pdf_size_normal / pdf_size_compressed); runs ghostscript in-place before the build-cache step so content caching still applies on top Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>