public function CacheDecorator::clearCachedDefinitions

Implements \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface::clearCachedDefinitions().

Overrides CachedDiscoveryInterface::clearCachedDefinitions

File

drupal/core/lib/Drupal/Core/Plugin/Discovery/CacheDecorator.php, line 116
Definition of Drupal\Core\Plugin\Discovery\CacheDecorator.

Class

CacheDecorator
Enables static and persistent caching of discovered plugin definitions.

Namespace

Drupal\Core\Plugin\Discovery

Code

public function clearCachedDefinitions() {
  if (isset($this->cacheKey)) {
    cache($this->cacheBin)
      ->delete($this->cacheKey);
  }
  $this->definitions = NULL;
}