Integrates Purge with Symfony Messenger. allowing for efficient off-thread realtime Purge dispatches.

The module replaces Purge's built-in queue (normally database or memory) with Symfony Messenger, enabling invalidations to be dispatched asynchronously (e.g. to Redis/RabbitMQ/SQS) with deduplication and configurable delays. Workers consuming the Messenger queue then execute the actual purge calls, decoupling cache invalidation from HTTP request threads.

Installation

  1. Install and configure Purge, Symfony Messenger, and Purge Messenger.
  2. Navigate to admin/config/development/performance/purge and select Change engine under the Queue dropdown.
  3. Select Messenger and save.
  4. New invalidations will now be intercepted via Symfony Messenger.
  5. The now-redundant Purge command (drush p:queue-work) can be disabled.

Configuration

Optional configuration is available:

  • Set purge_messenger.delay to delay message delivery
  • Set purge_messenger.immediate to buffer invalidations and send them in a batch after the HTTP response is sent.
Supporting organizations: 
Initial development

Project information

Releases