From ae75f8252214be1b05321e0d27ffb3925250968f Mon Sep 17 00:00:00 2001 From: soyuka Date: Mon, 19 Oct 2026 11:39:32 +0200 Subject: [PATCH] docs: document the MongoDB ODM HTTP cache purge listener Refs api-platform/core#8733 --- core/performance.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/performance.md b/core/performance.md index bda1c7d80d6..b554c814002 100644 --- a/core/performance.md +++ b/core/performance.md @@ -23,6 +23,14 @@ proxy’s cache. This ensures that the content served will always be fresh becau in real time. Support for most specific cases such as the invalidation of collections when a document is added or removed or for relationships and inverse relations is built-in. +The purge listener is registered automatically for Doctrine ORM. Since API Platform 5.1, when +`doctrine_mongodb_odm` is enabled, a MongoDB ODM listener +(`api_platform.doctrine_mongodb.odm.listener.http_cache.purge`, tagged +`doctrine_mongodb.odm.event_listener`) is registered as well. It purges the collection and item IRIs +of inserted, updated, upserted, and deleted documents, along with their referenced documents +(previous and current values, and members removed from reference collections). Inserts purge the +collection IRI only. + ### Integrations #### Built-in Caddy HTTP Cache