Repository navigation
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
- Bump the
CacheVersionModuleversion, 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. - A cached response whose own code sets
Cache-Control: privateorno-storeis not stored server-side. This includes a$headersproperty default. To keep it stored while sendingno-storeto the client, declare#[HttpCache(noStore: true)]. ResourceDonut::FORMATis private. UseResourceDonut::placeholder().- New minimum versions:
koriym/semantic-logger^0.11,bear/resource^1.22.4,ray/psr-cache-module^1.6,psr/log^2.0. Apps onpsr/log1.x stay on 1.17.1. - If you read the cache log, it now uses semantic-logger 0.11's
logdocument shape, and a diagnostic'skindis nowcode. - Interceptors and other implementation classes are now
@internal. Static analysis that enforces@internalreports 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 contradictoryno-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 inonGet()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.