You are here

public function DefaultPluginManager::useCaches in Plug 7

Disable the use of caches.

Can be used to ensure that uncached plugin definitions are returned, without invalidating all cached information.

This will also remove all local/static caches.

Parameters

bool $use_caches: FALSE to not use any caches.

Overrides CachedDiscoveryInterface::useCaches

File

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

Class

DefaultPluginManager
Base class for plugin managers.

Namespace

Drupal\Core\Plugin

Code

public function useCaches($use_caches = FALSE) {
  $this->useCaches = $use_caches;
  if (!$use_caches) {
    $this->definitions = NULL;
  }
}