You are here

private static function VarnishPurgeFeatureContext::purgeWildcardUrl in Varnish purger 8.2

Parameters

string $url:

1 call to VarnishPurgeFeatureContext::purgeWildcardUrl()
VarnishPurgeFeatureContext::iPurgeTheNodeList in tests/src/Behat/features/bootstrap/VarnishPurgeFeatureContext.php
@When I purge no-star

File

tests/src/Behat/features/bootstrap/VarnishPurgeFeatureContext.php, line 150

Class

VarnishPurgeFeatureContext
Behat steps for testing the varnish_purger module.

Code

private static function purgeWildcardUrl(string $url) {
  $p = \Drupal::service('purge.purgers');

  // This dummy processor is literally called "a".
  $a = \Drupal::service('purge.processors')
    ->get('a');
  $invalidations = [
    \Drupal::service('purge.invalidation.factory')
      ->get('wildcardurl', $url),
  ];

  // Varnish does have a queue, so if we get random failures we may need a
  // sleep here.
  $p
    ->invalidate($a, $invalidations);
}