You are here

public function FastlypurgerServiceProvider::alter in Fastly 8.3

Modifies existing service definitions.

Parameters

ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.

Overrides ServiceProviderBase::alter

File

modules/fastlypurger/src/FastlypurgerServiceProvider.php, line 16

Class

FastlypurgerServiceProvider
Modifies the Fastly fastly.cache_tags.invalidator service.

Namespace

Drupal\fastlypurger

Code

public function alter(ContainerBuilder $container) {
  $definition = $container
    ->getDefinition('fastly.cache_tags.invalidator');
  $definition
    ->clearTag('cache_tags_invalidator');
}