Skip to content
Snippets Groups Projects
Commit f150c849 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

Issue #2008644 by mradcliffe, Pancho: Fixed FilterPluginManager::__construct() calls CacheDecorator with incorrect parameters (expires).
parent 0756534a
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment