6 declare(strict_types=1);
46 $this->readerList = $readerList;
57 public function getStoresData(
string $runMode,
string $scopeCode =
null) : array
59 $cacheKey =
'resolved_stores_' . md5($runMode . $scopeCode);
60 $cacheData = $this->cache->load($cacheKey);
62 $storesData = $this->serializer->unserialize($cacheData);
64 $reader = $this->readerList->getReader($runMode);
65 $storesData = [$reader->getAllowedStoreIds($scopeCode), $reader->getDefaultStoreId($scopeCode)];
67 $this->serializer->serialize($storesData),
getStoresData(string $runMode, string $scopeCode=null)
__construct(\Magento\Framework\Cache\FrontendInterface $cache, \Magento\Store\Model\StoreResolver\ReaderList $readerList, \Magento\Framework\Serialize\SerializerInterface $serializer)