Skip to content

Add metadata cache - #343

Merged
DanielBadura merged 1 commit into
3.18.xfrom
metadata-cache
Oct 9, 2026
Merged

DanielBadura merged 1 commit into
3.18.xfrom
metadata-cache

Conversation

@DanielBadura

Copy link
Copy Markdown
Member

Like the doctrine bundle, the registries and metadata of aggregates, events and subscribers are now cached without debug, in a php file in the build dir that is created by the cache warmer. Previously the paths were scanned and the classes reflected on every request. With debug nothing is cached, so changes are picked up immediately.

The compiler passes no longer get the aggregate root registry from the container, since it would be read from the cache while compiling.

Requires patchlevel/event-sourcing 3.22.1, which uses valid PSR-6 keys for the metadata.

Cache the hydrator metadata

The metadata cache now also holds the hydrator metadata of the events, headers and aggregates with snapshots, for the stack hydrator as well as for the legacy metadata hydrator.

Requires patchlevel/hydrator 1.24.3, which uses valid PSR-6 keys and restores the metadata completely when it is loaded from a cache.

@DanielBadura DanielBadura added this to the 3.18.0 milestone Oct 7, 2026
@DanielBadura DanielBadura self-assigned this Oct 7, 2026
@DanielBadura DanielBadura added the enhancement New feature or request label Oct 7, 2026
Like the doctrine bundle, the registries and metadata of aggregates, events
and subscribers are now cached without debug, in a php file in the build
dir that is created by the cache warmer. Previously the paths were scanned
and the classes reflected on every request. With debug nothing is cached,
so changes are picked up immediately.

The compiler passes no longer get the aggregate root registry from the
container, since it would be read from the cache while compiling.

Requires patchlevel/event-sourcing 3.22.1, which uses valid PSR-6 keys for
the metadata.

Cache the hydrator metadata

The metadata cache now also holds the hydrator metadata of the events,
headers and aggregates with snapshots, for the stack hydrator as well as
for the legacy metadata hydrator.

Requires patchlevel/hydrator 1.24.3, which uses valid PSR-6 keys and
restores the metadata completely when it is loaded from a cache.
@DanielBadura
DanielBadura merged commit 905f18e into 3.18.x Oct 9, 2026
22 of 23 checks passed
@DanielBadura
DanielBadura deleted the metadata-cache branch October 9, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants