function DerivativeDiscoveryDecorator::useCaches

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php \Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator::useCaches()

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

core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php, line 257

Class

DerivativeDiscoveryDecorator
Base class providing the tools for a plugin discovery to be derivative aware.

Namespace

Drupal\Component\Plugin\Discovery

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.