protected function UrlAndPathQueuer::initialize in URLs queuer 8
Initialize the invalidation factory and queue service.
Return value
bool TRUE when everything is available, FALSE when our plugin is disabled.
1 call to UrlAndPathQueuer::initialize()
- UrlAndPathQueuer::invalidateTags in src/
Plugin/ Purge/ Queuer/ UrlAndPathQueuer.php - Queues invalidated cache tags as tag purgables.
File
- src/
Plugin/ Purge/ Queuer/ UrlAndPathQueuer.php, line 60
Class
- UrlAndPathQueuer
- Queues URLs or paths when Drupal invalidates cache tags.
Namespace
Drupal\purge_queuer_url\Plugin\Purge\QueuerCode
protected function initialize() {
if (is_null($this->queuer)) {
// Attempt to load the queuer plugin, when it fails it is disabled.
$this->queuer = $this->container
->get('purge.queuers')
->get('urlpath');
if ($this->queuer !== FALSE) {
$this->purgeInvalidationFactory = $this->container
->get('purge.invalidation.factory');
$this->purgeQueue = $this->container
->get('purge.queue');
$this->registry = $this->container
->get('purge_queuer_url.registry');
}
}
return $this->queuer !== FALSE;
}