Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CacheRouterRebuildSubscriber.php

function CacheRouterRebuildSubscriber::getSubscribedEvents

Overrides EventSubscriberInterface::getSubscribedEvents

File

core/lib/Drupal/Core/EventSubscriber/CacheRouterRebuildSubscriber.php, line 26

Class

CacheRouterRebuildSubscriber
Clear cache tags when the router is rebuilt.

Namespace

Drupal\Core\EventSubscriber

Code

public static function getSubscribedEvents() : array {
    $events = [];
    // Act only when the router rebuild is finished.
    $events[RoutingEvents::FINISHED][] = [
        'onRouterFinished',
        200,
    ];
    return $events;
}
RSS feed
Powered by Drupal