Mercurial > hg > isophonics-drupal-site
annotate core/lib/Drupal/Component/Plugin/Discovery/CachedDiscoveryInterface.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\Component\Plugin\Discovery; |
Chris@0 | 4 |
Chris@0 | 5 /** |
Chris@0 | 6 * Interface for discovery components holding a cache of plugin definitions. |
Chris@0 | 7 */ |
Chris@0 | 8 interface CachedDiscoveryInterface extends DiscoveryInterface { |
Chris@0 | 9 |
Chris@0 | 10 /** |
Chris@0 | 11 * Clears static and persistent plugin definition caches. |
Chris@0 | 12 * |
Chris@0 | 13 * Don't resort to calling \Drupal::cache()->delete() and friends to make |
Chris@0 | 14 * Drupal detect new or updated plugin definitions. Always use this method on |
Chris@0 | 15 * the appropriate plugin type's plugin manager! |
Chris@0 | 16 */ |
Chris@0 | 17 public function clearCachedDefinitions(); |
Chris@0 | 18 |
Chris@0 | 19 /** |
Chris@0 | 20 * Disable the use of caches. |
Chris@0 | 21 * |
Chris@0 | 22 * Can be used to ensure that uncached plugin definitions are returned, |
Chris@0 | 23 * without invalidating all cached information. |
Chris@0 | 24 * |
Chris@0 | 25 * This will also remove all local/static caches. |
Chris@0 | 26 * |
Chris@0 | 27 * @param bool $use_caches |
Chris@0 | 28 * FALSE to not use any caches. |
Chris@0 | 29 */ |
Chris@0 | 30 public function useCaches($use_caches = FALSE); |
Chris@0 | 31 |
Chris@0 | 32 } |