robots = $robots; $this->storeManager = $storeManager ?: \Magento\Framework\App\ObjectManager::getInstance() ->get(StoreManagerInterface::class); parent::__construct($context, $data); } /** * Retrieve base content for robots.txt file * * @return string * @since 100.1.0 */ protected function _toHtml() { return $this->robots->getData() . PHP_EOL; } /** * Get unique page cache identities * * @return array * @since 100.1.0 */ public function getIdentities() { return [ Value::CACHE_TAG . '_' . $this->storeManager->getStore()->getId(), ]; } }