Skip to content

Commit 6369c07

Browse files
committed
MAGETWO-82202: ProductRepository sku cache is corrupted when cacheLimit is reached #11537
- Merge Pull Request #11537 from heldchen/magento2:patch-1 - Merged commits: 1. f3e91d4
2 parents ad44399 + f3e91d4 commit 6369c07

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)