Skip to content

Commit

Permalink
Fixed splitting purge request chunks magento#8815
Browse files Browse the repository at this point in the history
  • Loading branch information
wujku committed Jan 28, 2020
1 parent 06a0dd0 commit 0bb73f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/CacheInvalidate/Model/PurgeCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private function splitTags($tagsPattern)
{
$tagsBatchSize = 0;
$formattedTagsChunk = [];
$formattedTags = explode('|', $tagsPattern);
$formattedTags = array_filter(preg_split('/(?!\))\|(?=\()/', $tagsPattern));
foreach ($formattedTags as $formattedTag) {
if ($tagsBatchSize + strlen($formattedTag) > $this->requestSize - count($formattedTagsChunk) - 1) {
yield implode('|', $formattedTagsChunk);
Expand Down

0 comments on commit 0bb73f4

Please sign in to comment.