Skip to content
Snippets Groups Projects
Commit 2aa84d21 authored by Bram Goffings's avatar Bram Goffings Committed by Tim Plunkett
Browse files

added a cache decorator to improve performance

parent 81b16bb2
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment