← All changes

SummerCMS 0.3.1

v0.3.12 min readFramework

Highlights

  • One-time cache values. Cache.Pull reads a value and deletes it in one atomic step, so a code or ticket stored in the cache can be redeemed only once, even when two requests race for it.
  • Branded error pages for browsers. A visitor who opens a missing page, uses a wrong method or hits a server error in the browser now sees a SummerCMS page instead of a bare line of text. API clients see the same responses as before.

Added

  • cooler.Cache.Pull(ctx, key) returns the value at a key and removes it, like Laravel's Cache::pull. Of two concurrent callers, at most one gets the value; missing and expired keys report "not found". The Redis driver uses GETDEL (Redis 6.2 or newer); the memory driver runs under the per-key lock. The caching guide has a new "One-time values" section.
  • surf renders a self-contained HTML page for framework-generated 404, 405 and 500 responses to browser navigations: unmatched routes, wrong methods, failed route constraints, the unpublished uploads route and recovered panics. API paths, the admin, JSON and XHR requests keep their exact bodies.
  • The error page shows the method, path and request ID only with app.debug on or outside production.
  • Applications and themes can replace the page by publishing a surf.ErrorPageRenderer from Register; http.error_pages.enabled: false turns the HTML pages off for every client.

Changed

  • cooler.Cache has a new method, Pull. If you implement the interface yourself, for example as a test fake, add it when upgrading.

Fixed

  • The caching docs now name the site's purge-token variable correctly: NUXT_CACHE_PURGE_TOKEN (and NUXT_CACHE_PURGE_ALLOW_PROXIED), not a NUXT_SITE_* name, which the SEO module would publish in every page's payload.
Subscribe via RSS