protected function CacheTagsInvalidator::getInvalidatorCacheBins

protected CacheTagsInvalidator::getInvalidatorCacheBins()

Returns all cache bins that need to be notified about invalidations.

Return value

\Drupal\Core\Cache\CacheTagsInvalidatorInterface[] An array of cache backend objects that implement the invalidator interface, keyed by their cache bin.

File

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

Class

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

Namespace

Drupal\Core\Cache

Code

protected function getInvalidatorCacheBins() {
  $bins = array();
  foreach ($this->container->getParameter('cache_bins') as $service_id => $bin) {
    $service = $this->container->get($service_id);
    if ($service instanceof CacheTagsInvalidatorInterface) {
      $bins[$bin] = $service;
    }
  }
  return $bins;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!CacheTagsInvalidator.php/function/CacheTagsInvalidator::getInvalidatorCacheBins/8.1.x