3 namespace Drupal\Component\Plugin\Discovery;
6 * Interface for discovery components holding a cache of plugin definitions.
8 interface CachedDiscoveryInterface extends DiscoveryInterface {
11 * Clears static and persistent plugin definition caches.
13 * Don't resort to calling \Drupal::cache()->delete() and friends to make
14 * Drupal detect new or updated plugin definitions. Always use this method on
15 * the appropriate plugin type's plugin manager!
17 public function clearCachedDefinitions();
20 * Disable the use of caches.
22 * Can be used to ensure that uncached plugin definitions are returned,
23 * without invalidating all cached information.
25 * This will also remove all local/static caches.
27 * @param bool $use_caches
28 * FALSE to not use any caches.
30 public function useCaches($use_caches = FALSE);