Skip to content

Commit e2f29b5

Browse files
authored
Use current sore id for category runtime cache
1 parent 4a1f1b2 commit e2f29b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/CategoryRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function save(CategoryInterface $category)
147147
*/
148148
public function get($categoryId, $storeId = null)
149149
{
150-
$cacheKey = $storeId ?? 'all';
150+
$cacheKey = $storeId ?? $this->storeManager->getStore()->getId();
151151
if (!isset($this->instances[$categoryId][$cacheKey])) {
152152
/** @var Category $category */
153153
$category = $this->categoryFactory->create();

0 commit comments

Comments
 (0)