You are here

public function DefaultPluginManager::clearCachedDefinitions in Plug 7

Clears static and persistent plugin definition caches.

Don't resort to calling \Drupal::cache()->delete() and friends to make Drupal detect new or updated plugin definitions. Always use this method on the appropriate plugin type's plugin manager!

Overrides CachedDiscoveryInterface::clearCachedDefinitions

File

lib/Drupal/Core/Plugin/DefaultPluginManager.php, line 175
Contains \Drupal\Core\Plugin\DefaultPluginManager.

Class

DefaultPluginManager
Base class for plugin managers.

Namespace

Drupal\Core\Plugin

Code

public function clearCachedDefinitions() {
  if ($this->cacheBackend) {
    $this->cacheBackend
      ->clear($this->cacheKey);
  }
  $this->definitions = NULL;
}