function CachePreWarmer::__construct

File

core/lib/Drupal/Core/PreWarm/CachePreWarmer.php, line 48

Class

CachePreWarmer
Prewarms caches for services that implement PreWarmableInterface.

Namespace

Drupal\Core\PreWarm

Code

public function __construct(protected readonly ClassResolverInterface $classResolver, protected array $serviceIds) {
  // Ensure the serviceId order is random to reduce chances of conflicts.
  shuffle($this->serviceIds);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.