Skip to content

1.18.0

Latest

Choose a tag to compare

@koriym koriym released this 29 Oct 14:37
df19ba8

A cache-correctness release. A response that marks itself private is no longer stored for every visitor, #[DonutCache] holes with query strings render correctly, and a failed render no longer caches an empty page. Symfony 8 is supported on PHP 8.4+.

Before you deploy

  1. Bump the CacheVersionModule version, or clear the pools if you bind your own cache adapter. Entries written by earlier versions may hold per-user content, and during a rolling deploy an older version shows raw [le2:...] placeholders.
  2. A cached response whose own code sets Cache-Control: private or no-store is not stored server-side. This includes a $headers property default. To keep it stored while sending no-store to the client, declare #[HttpCache(noStore: true)].
  3. ResourceDonut::FORMAT is private. Use ResourceDonut::placeholder().
  4. New minimum versions: koriym/semantic-logger ^0.11, bear/resource ^1.22.4, ray/psr-cache-module ^1.6, psr/log ^2.0. Apps on psr/log 1.x stay on 1.17.1.
  5. If you read the cache log, it now uses semantic-logger 0.11's log document shape, and a diagnostic's kind is now code.
  6. Interceptors and other implementation classes are now @internal. Static analysis that enforces @internal reports an app that references them; reference the attributes, interfaces and modules instead.

If you use BEAR.EventSourcing, use 0.2.0 or later.

Notable fixes

  • #[HttpCache(noStore: true)] and #[NoHttpCache] no longer send a contradictory no-store, max-age=… (#243).
  • A #[DonutCache] hole whose URI has two or more query parameters no longer leaks a raw placeholder (#232).
  • A page whose render throws no longer stores an empty template that is then served to every visitor.
  • A degraded cache read (a down pool, or a hole failing while a cached page is refreshed) now renders the page in full instead of answering 200 with an unfilled #[Embed] hole.
  • A #[DonutCache]/#[CacheableResponse] page that reads a cached embedded child in onGet() is purged together with that child.
  • In a long-running runtime (Swoole, RoadRunner), a second cache miss of the same page no longer replays the first miss's stale view.

See CHANGELOG.md for the full list of changes.

Try it

Let an agent set it up: install the bear-observe skill, then ask it to "look at the log".
It installs the observation context, proves the wiring, runs one request and reads the tree.

composer require --dev bear/event-sourcing
mkdir -p .claude/skills && cp -r vendor/bear/event-sourcing/skills/bear-observe .claude/skills/

To wire it by hand, see the Observability section of the
cache manual.