CachedDiscoveryClearer.php in Drupal 8
File
core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php
View source
<?php
namespace Drupal\Core\Plugin;
use Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface;
class CachedDiscoveryClearer implements CachedDiscoveryClearerInterface {
protected $cachedDiscoveries = [];
public function addCachedDiscovery(CachedDiscoveryInterface $cached_discovery) {
$this->cachedDiscoveries[] = $cached_discovery;
}
public function clearCachedDefinitions() {
foreach ($this->cachedDiscoveries as $cached_discovery) {
$cached_discovery
->clearCachedDefinitions();
}
}
}