public function QueueService::destruct in Purge 8.3
Performs destruct operations.
Overrides DestructableInterface::destruct
File
- src/
Plugin/ Purge/ Queue/ QueueService.php, line 333
Class
- QueueService
- Provides the service that lets invalidations interact with a queue backend.
Namespace
Drupal\purge\Plugin\Purge\QueueCode
public function destruct() {
// The queue service attempts to collect all actions done for invalidations
// in $this->buffer, and commits them as infrequent as possible during
// runtime. At minimum it will commit to the underlying queue plugin upon
// shutdown and by doing so, attempts to reduce and bundle the amount of
// work the queue has to do (e.g., queries, disk writes, mallocs). This
// helps purge to scale better and should cause no noticeable side-effects.
$this
->commit();
}