function CacheTagsChecksumTrait::rootTransactionEndCallback

Same name in other branches
  1. 9 core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php \Drupal\Core\Cache\CacheTagsChecksumTrait::rootTransactionEndCallback()
  2. 10 core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php \Drupal\Core\Cache\CacheTagsChecksumTrait::rootTransactionEndCallback()
  3. 11.x core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php \Drupal\Core\Cache\CacheTagsChecksumTrait::rootTransactionEndCallback()

Callback to be invoked just after a database transaction gets committed.

Executes all delayed tag invalidations.

Parameters

bool $success: Whether or not the transaction was successful.

File

core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php, line 43

Class

CacheTagsChecksumTrait
A trait for cache tag checksum implementations.

Namespace

Drupal\Core\Cache

Code

public function rootTransactionEndCallback($success) {
    if ($success) {
        $this->doInvalidateTags($this->delayedTags);
    }
    $this->delayedTags = [];
}

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