protected function PluginId::getCacheableMetadata in Plugin 8.2
Gets this instance's cacheable metadata.
Return value
\Drupal\Core\Cache\CacheableMetadata
File
- src/
Plugin/ views/ filter/ PluginId.php, line 91
Class
- PluginId
- Provides a Views filter for plugin IDs.
Namespace
Drupal\plugin\Plugin\views\filterCode
protected function getCacheableMetadata() {
$cacheable_metadata = new CacheableMetadata();
$cacheable_metadata
->addCacheableDependency($this->pluginType
->getPluginManager());
$cacheable_metadata
->addCacheTags(parent::getCacheTags());
$cacheable_metadata
->addCacheContexts(parent::getCacheContexts());
$cacheable_metadata
->mergeCacheMaxAge(parent::getCacheMaxAge());
return $cacheable_metadata;
}