v0.4.0 — Edge caching, layout loaders, hardened errors
What's new in 0.4.0
- Edge caching. Declare cacheable routes in
pyxle.config.json::cacheand pages are servedCache-Control: public, s-maxage=N(plusstale-while-revalidate) so a CDN or reverse proxy can absorb traffic instead of your origin. The per-user CSRF cookie is automatically omitted from cacheable responses. - Layout & template loaders. A
layout.pyxlortemplate.pyxlcan declare its own@serverloader; its result lands on the component'sdataprop, just like a page — so shared UI (nav bars, the signed-in user, the framework version) loads once per request without repeating the loader in every page. - Hardened production errors. SSR render failures — including the SPA-navigation JSON path — are sanitized in the response (no exception type, message, or path leaks to the client) while the full error is written to the server log for operators.
- Faster static serving. The static-asset middleware indexes public/client paths up front, skipping a per-request filesystem
stat+ exception on every dynamic request.
Upgrade: pip install --upgrade pyxle-framework
Full notes: see the Changelog.