feat(httpcache): add doctrine mongodb odm purge listener by soyuka · Pull Request #8733 · api-platform/core · GitHub
Skip to content

feat(httpcache): add doctrine mongodb odm purge listener - #8733

Open
soyuka wants to merge 1 commit into
api-platform:mainfrom
soyuka:feat/odm-http-cache-purger-8098
Open

soyuka wants to merge 1 commit into
api-platform:mainfrom
soyuka:feat/odm-http-cache-purger-8098

Conversation

@soyuka

@soyuka soyuka commented Oct 19, 2026

Copy link
Copy Markdown
Member
Q A
Branch? main
Tickets Fixes #8098
License MIT
Doc PR todo

HTTP cache invalidation only had a Doctrine ORM purge listener. This adds the MongoDB ODM one, registered when doctrine_mongodb_odm and http_cache.invalidation are enabled. It purges inserted (collection only), updated, upserted and deleted documents, plus their references (old and new values, and members removed from reference collections). Code shared with the ORM listener moves to an internal trait, the ORM behaviour is unchanged.

References inside embedded documents are not followed, there's no ORM equivalent.

HTTP cache invalidation only registered a Doctrine ORM listener. Add
its MongoDB ODM counterpart, loaded when doctrine_mongodb_odm and
http_cache.invalidation are enabled. The tag collection shared by both
listeners moves to an internal trait.

Fixes api-platform#8098
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doctrine ODM HttpCache Purger

1 participant