function CacheTagsInvalidator::addBin

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Cache/CacheTagsInvalidator.php \Drupal\Core\Cache\CacheTagsInvalidator::addBin()

Adds a cache bin.

Parameters

\Drupal\Core\Cache\CacheBackendInterface $bin: A cache bin.

File

core/lib/Drupal/Core/Cache/CacheTagsInvalidator.php, line 72

Class

CacheTagsInvalidator
Passes cache tag events to classes that wish to respond to them.

Namespace

Drupal\Core\Cache

Code

public function addBin(CacheBackendInterface $bin) : void {
    if ($bin instanceof CacheTagsInvalidatorInterface) {
        $this->bins[] = $bin;
    }
}

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