Skip to content

Commit

Permalink
MAGETWO-67055: Empty resolvedScopeCodes when config cache is cleaned #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Korshenko authored Apr 10, 2017
2 parents add0b1d + 64c6ff7 commit bf63ca2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/internal/Magento/Framework/App/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public function isSetFlag($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAU

/**
* Invalidate cache by type
* Clean scopeCodeResolver
*
* @return void
*/
Expand All @@ -103,6 +104,7 @@ public function clean()
foreach ($this->types as $type) {
$type->clean();
}
$this->scopeCodeResolver->clean();
}

/**
Expand Down
10 changes: 10 additions & 0 deletions lib/internal/Magento/Framework/App/Config/ScopeCodeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,14 @@ public function resolve($scopeType, $scopeCode)
$this->resolvedScopeCodes[$scopeType][$scopeCode] = $resolverScopeCode;
return $resolverScopeCode;
}

/**
* Clean resolvedScopeCodes, store codes may have been renamed
*
* @return void
*/
public function clean()
{
$this->resolvedScopeCodes = [];
}
}

0 comments on commit bf63ca2

Please sign in to comment.