private static function VarnishPurgeFeatureContext::purgeEverything in Varnish purger 8.2
2 calls to VarnishPurgeFeatureContext::purgeEverything()
- VarnishPurgeFeatureContext::iPurgeEverything in tests/
src/ Behat/ features/ bootstrap/ VarnishPurgeFeatureContext.php - @When I purge everything
- VarnishPurgeFeatureContext::tearDown in tests/
src/ Behat/ features/ bootstrap/ VarnishPurgeFeatureContext.php - @AfterScenario
File
- tests/
src/ Behat/ features/ bootstrap/ VarnishPurgeFeatureContext.php, line 78
Class
- VarnishPurgeFeatureContext
- Behat steps for testing the varnish_purger module.
Code
private static function purgeEverything() {
$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('everything', NULL),
];
// Varnish does have a queue, so if we get random failures we may need a
// sleep here.
$p
->invalidate($a, $invalidations);
}