reverted: --- b/core/lib/Drupal/Component/Plugin/PluginManagerCachedBase.php +++ /dev/null @@ -1,22 +0,0 @@ -discovery->clearCachedDefinitions(); - } - -} diff -u b/core/lib/Drupal/Core/Plugin/Discovery/CacheDecorator.php b/core/lib/Drupal/Core/Plugin/Discovery/CacheDecorator.php --- b/core/lib/Drupal/Core/Plugin/Discovery/CacheDecorator.php +++ b/core/lib/Drupal/Core/Plugin/Discovery/CacheDecorator.php @@ -7,12 +7,12 @@ namespace Drupal\Core\Plugin\Discovery; -use Drupal\Component\Plugin\Discovery\DiscoveryInterface; +use Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface; /** * Enables static and persistent caching of discovered plugin definitions. */ -class CacheDecorator implements DiscoveryInterface { +class CacheDecorator implements CachedDiscoveryInterface { /** * The cache key used to store the definition list. reverted: --- b/core/lib/Drupal/Core/TypedData/TypedDataManager.php +++ a/core/lib/Drupal/Core/TypedData/TypedDataManager.php @@ -7,14 +7,14 @@ namespace Drupal\Core\TypedData; +use Drupal\Component\Plugin\PluginManagerBase; -use Drupal\Component\Plugin\PluginManagerCachedBase; use Drupal\Core\Plugin\Discovery\CacheDecorator; use Drupal\Core\Plugin\Discovery\HookDiscovery; /** * Manages data type plugins. */ +class TypedDataManager extends PluginManagerBase { -class TypedDataManager extends PluginManagerCachedBase { public function __construct() { $this->discovery = new CacheDecorator(new HookDiscovery('data_type_info'), 'typed_data:types'); diff -u b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php --- b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php @@ -7,7 +7,7 @@ namespace Drupal\field\Plugin\Type\Formatter; -use Drupal\Component\Plugin\PluginManagerCachedBase; +use Drupal\Component\Plugin\PluginManagerBase; use Drupal\Core\Plugin\Discovery\CacheDecorator; use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; use Drupal\field\Plugin\Type\Formatter\FormatterLegacyDiscoveryDecorator; @@ -16,7 +16,7 @@ /** * Plugin type manager for field formatters. */ -class FormatterPluginManager extends PluginManagerCachedBase { +class FormatterPluginManager extends PluginManagerBase { /** * Overrides Drupal\Component\Plugin\PluginManagerBase:$defaults. diff -u b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php --- b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php @@ -7,7 +7,7 @@ namespace Drupal\field\Plugin\Type\Widget; -use Drupal\Component\Plugin\PluginManagerCachedBase; +use Drupal\Component\Plugin\PluginManagerBase; use Drupal\Core\Plugin\Discovery\CacheDecorator; use Drupal\Core\Plugin\Discovery\AlterDecorator; use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; @@ -16,7 +16,7 @@ /** * Plugin type manager for field widgets. */ -class WidgetPluginManager extends PluginManagerCachedBase { +class WidgetPluginManager extends PluginManagerBase { /** * Overrides Drupal\Component\Plugin\PluginManagerBase:$defaults. reverted: --- b/core/modules/views/lib/Drupal/views/Plugin/Type/JoinManager.php +++ a/core/modules/views/lib/Drupal/views/Plugin/Type/JoinManager.php @@ -7,13 +7,13 @@ namespace Drupal\views\Plugin\Type; +use Drupal\Component\Plugin\PluginManagerBase; -use Drupal\Component\Plugin\PluginManagerCachedBase; use Drupal\Component\Plugin\Factory\DefaultFactory; use Drupal\Core\Plugin\Discovery\AlterDecorator; use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; use Drupal\Core\Plugin\Discovery\CacheDecorator; +class JoinManager extends PluginManagerBase { -class JoinManager extends PluginManagerCachedBase { /** * Constructs a JoinManager object. reverted: --- b/core/modules/views/lib/Drupal/views/Plugin/Type/PluginManager.php +++ a/core/modules/views/lib/Drupal/views/Plugin/Type/PluginManager.php @@ -7,13 +7,13 @@ namespace Drupal\views\Plugin\Type; +use Drupal\Component\Plugin\PluginManagerBase; -use Drupal\Component\Plugin\PluginManagerCachedBase; use Drupal\Component\Plugin\Factory\DefaultFactory; use Drupal\Core\Plugin\Discovery\AlterDecorator; use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; use Drupal\Core\Plugin\Discovery\CacheDecorator; +class PluginManager extends PluginManagerBase { -class PluginManager extends PluginManagerCachedBase { /** * Constructs a PluginManager object. reverted: --- b/core/modules/views/lib/Drupal/views/Plugin/Type/WizardManager.php +++ a/core/modules/views/lib/Drupal/views/Plugin/Type/WizardManager.php @@ -7,13 +7,13 @@ namespace Drupal\views\Plugin\Type; +use Drupal\Component\Plugin\PluginManagerBase; -use Drupal\Component\Plugin\PluginManagerCachedBase; use Drupal\Component\Plugin\Factory\DefaultFactory; use Drupal\Core\Plugin\Discovery\AlterDecorator; use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; use Drupal\Core\Plugin\Discovery\CacheDecorator; +class WizardManager extends PluginManagerBase { -class WizardManager extends PluginManagerCachedBase { /** * Constructs a WizardManager object. only in patch2: unchanged: --- /dev/null +++ b/core/lib/Drupal/Component/Plugin/Discovery/CachedDiscoveryInterface.php @@ -0,0 +1,20 @@ +discovery instanceof CachedDiscoveryInterface) { + $this->discovery->clearCachedDefinitions(); + } + } + + /** * Implements Drupal\Component\Plugin\PluginManagerInterface::createInstance(). */ public function createInstance($plugin_id, array $configuration = array()) {