Skip to content

v0.4.0 — Edge caching, layout loaders, hardened errors

Choose a tag to compare

@shivamsn97 shivamsn97 released this 08 Jun 06:10
· 26 commits to main since this release
964b722

What's new in 0.4.0

  • Edge caching. Declare cacheable routes in pyxle.config.json::cache and pages are served Cache-Control: public, s-maxage=N (plus stale-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.pyxl or template.pyxl can declare its own @server loader; its result lands on the component's data prop, 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.