/** * Get cache class by cache type from configuration * * @param string $type * @return \Magento\Framework\Cache\FrontendInterface * @throws \UnexpectedValueException */ protected function _getTypeInstance($type) { $config = $this->_config->getType($type); if (!isset($config['instance'])) { return null; } return $this->_factory->get($config['instance']); }