Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 14cd8c3

Browse files
committed
MAGETWO-82283: MAGETWO-82202: ProductRepository sku cache is corrupted when cacheLimit is reached #11553
- Merge Pull Request magento/magento2#11553 from heldchen/magento2:2.2-develop - Merged commits: 1. 3b50751
2 parents f1e6d1c + 3b50751 commit 14cd8c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ private function cacheProduct($cacheKey, \Magento\Catalog\Api\Data\ProductInterf
312312
if ($this->cacheLimit && count($this->instances) > $this->cacheLimit) {
313313
$offset = round($this->cacheLimit / -2);
314314
$this->instancesById = array_slice($this->instancesById, $offset, null, true);
315-
$this->instances = array_slice($this->instances, $offset);
315+
$this->instances = array_slice($this->instances, $offset, null, true);
316316
}
317317
}
318318

0 commit comments

Comments
 (0)