Commit f150c849 authored by Dries's avatar Dries

Issue #2008644 by mradcliffe, Pancho: Fixed FilterPluginManager::__construct()...

Issue #2008644 by mradcliffe, Pancho: Fixed FilterPluginManager::__construct() calls CacheDecorator with incorrect parameters (expires).
parent 0756534a
......@@ -9,6 +9,7 @@
use Drupal\Component\Plugin\PluginManagerBase;
use Drupal\Component\Plugin\Factory\DefaultFactory;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Language\Language;
use Drupal\Core\Plugin\Discovery\AlterDecorator;
use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery;
......@@ -32,9 +33,9 @@ public function __construct(\Traversable $namespaces) {
$annotation_namespaces = array('Drupal\filter\Annotation' => $namespaces['Drupal\filter']);
$this->discovery = new AnnotatedClassDiscovery('Filter', $namespaces, $annotation_namespaces, 'Drupal\filter\Annotation\Filter');
$this->discovery = new AlterDecorator($this->discovery, 'filter_info');
$this->discovery = new CacheDecorator($this->discovery, 'filter_plugins:' . language(Language::TYPE_INTERFACE)->langcode, 'cache', array(
'filter_formats' => TRUE,
));
$cache_key = 'filter_plugins:' . language(Language::TYPE_INTERFACE)->langcode;
$cache_tags = array('filter_formats' => TRUE);
$this->discovery = new CacheDecorator($this->discovery, $cache_key, 'cache', CacheBackendInterface::CACHE_PERMANENT, $cache_tags);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment