_cache = $cache; $this->_readerFactory = $readerFactory; } /** * Get reader instance * * @return \Magento\Framework\ObjectManager\Config\Reader\Dom */ protected function _getReader() { if (empty($this->_reader)) { $this->_reader = $this->_readerFactory->create(); } return $this->_reader; } /** * {inheritdoc} */ public function load($area) { $cacheId = $area . '::DiConfig'; $data = $this->_cache->load($cacheId); if (!$data) { $data = $this->_getReader()->read($area); $this->_cache->save($this->getSerializer()->serialize($data), $cacheId); } else { $data = $this->getSerializer()->unserialize($data); } return $data; } /** * Get serializer * * @return SerializerInterface * @deprecated 101.0.0 */ private function getSerializer() { if (null === $this->serializer) { $this->serializer = \Magento\Framework\App\ObjectManager::getInstance()->get(Serialize::class); } return $this->serializer; } }