private function SitemapWarmer::cdnWarmer in Warmer 2.x
Same name and namespace in other branches
- 8 modules/warmer_cdn/src/Plugin/warmer/SitemapWarmer.php \Drupal\warmer_cdn\Plugin\warmer\SitemapWarmer::cdnWarmer()
Lazily get the CDN warmer.
Return value
\Drupal\warmer_cdn\Plugin\warmer\CdnWarmer The CDN warmer.
Throws
\Drupal\Component\Plugin\Exception\PluginException
File
- modules/
warmer_cdn/ src/ Plugin/ warmer/ SitemapWarmer.php, line 248
Class
- SitemapWarmer
- The cache warmer for the built-in entity cache.
Namespace
Drupal\warmer_cdn\Plugin\warmerCode
private function cdnWarmer() {
if ($this->warmer instanceof CdnWarmer) {
return $this->warmer;
}
$configuration = $this
->getConfiguration();
$warmer = $this->warmerManager
->createInstance('cdn', [
'headers' => $configuration['headers'],
'verify' => $configuration['verify'],
'maxConcurrentRequests' => $configuration['maxConcurrentRequests'],
]);
assert($warmer instanceof CdnWarmer);
$this->warmer = $warmer;
return $warmer;
}