Skip to content

Commit bd51f4d

Browse files
committed
MC-38593: Complex products children ids are not cached in Type class leading to multiple unnecessary db requests
1 parent 6f38e2d commit bd51f4d

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Bundle/Model/Product

1 file changed

+1
-1
lines changed

app/code/Magento/Bundle/Model/Product/Type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public function getParentIdsByChild($childId)
315315
return $this->_bundleSelection->getParentIdsByChild($childId);
316316
}
317317

318-
$cacheKey = is_array($childId) ? implode('-', $childId) : $childId;
318+
$cacheKey = is_array($childId) ? array_shift($childId) : $childId;
319319
if (!isset($this->cacheParentIdsByChild[$cacheKey])) {
320320
$this->cacheParentIdsByChild[$cacheKey] = $this->_bundleSelection->getParentIdsByChild($childId);
321321
}

0 commit comments

Comments
 (0)