v0.8.0

<p>Blocks can opt into a server-side fragment cache, collections gain count, sum and prune, and a registry rebuild refuses other requests with a 503 instead of exposing a half-built index.</p>

19 October 2026

Added

  • The fragment cache. {fragment 'name', cache: 300} and {companion 'name', cache: 300} take an integer-literal TTL in seconds. Page::render() serves the cached HTML before any controller runs, for anonymous GET and HEAD requests outside debug (App::isCacheable()). The key is the page URL, the block, the sorted query and whether the request came from htmx. A response that left a session active is never stored.
  • Any content write flushes the fragment cache: the page, item, file and user events. deploy.php clears it after each deploy.
  • Collection fields: count($query), sum($field, $query) and isEmpty() are answered by the registry without loading items. history: false keeps a collection's items out of git, with a .gitignore that ignores itself. scoped: false lets code read items whose page the visitor can't open (Registry::unscoped()).
  • phlat collection:prune <page> <field> --where=<query> deletes the matching items. --dry-run reports without deleting, --force skips the prompt, and a locked item is skipped and reported.
  • Date literals in registry queries on content fields: starts>=2026-10-18, starts<2026-10-18T09:00Z. A date with no offset is read in the site timezone, and with no time it is the start of that day. Registry::sumRows() backs sum().
  • ServiceUnavailableException (503, with a Retry-After header). App::lock() throws it when the wait times out.
  • Cli::args() splits a command's arguments into positional values and --flags, and the commands use it instead of their own loops.
  • phlat collection:export and Toolkit\Csv.
  • registry:check also checks collection items.

Changed

  • Record::create() emits page.create:after, user.create:after or item.create:after with the record as saved, in place of Page::new() emitting its own.
  • A full registry rebuild holds the registry:rebuild lock and keeps bootstrapped at 0 while it runs. Other requests get a 503 instead of reading a half-built registry, and a rebuild that dies is retried by the next boot.
  • Cache::flush() creates nothing when the cache file doesn't exist.

Comments

No comments yet. Be the first!

Loading form…