From 2aa84d212eb9db8ddea8696b11d42ccf631d2611 Mon Sep 17 00:00:00 2001 From: Bram Goffings <bramgoffings@gmail.com> Date: Sat, 11 Aug 2012 13:58:26 +0200 Subject: [PATCH] added a cache decorator to improve performance --- lib/Drupal/views/Plugin/Type/ViewsPluginManager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Drupal/views/Plugin/Type/ViewsPluginManager.php b/lib/Drupal/views/Plugin/Type/ViewsPluginManager.php index 553893e708fa..ed3ee749ab89 100644 --- a/lib/Drupal/views/Plugin/Type/ViewsPluginManager.php +++ b/lib/Drupal/views/Plugin/Type/ViewsPluginManager.php @@ -10,6 +10,7 @@ use Drupal\Component\Plugin\PluginManagerBase; use Drupal\Component\Plugin\Factory\DefaultFactory; use Drupal\views\Plugin\Discovery\ViewsDiscovery; +use Drupal\Core\Plugin\Discovery\CacheDecorator; class ViewsPluginManager extends PluginManagerBase { /** @@ -22,7 +23,7 @@ class ViewsPluginManager extends PluginManagerBase { public function __construct($type) { $this->type = $type; - $this->discovery = new ViewsDiscovery('views', $this->type); + $this->discovery = new CacheDecorator(new ViewsDiscovery('views', $this->type), 'views:' . $this->type, 'cache'); $this->factory = new DefaultFactory($this->discovery); } } -- GitLab