Skip to content

Commit

Permalink
Empty resolvedScopeCodes when config cache is cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-wickberg-vaimo committed Mar 30, 2017
1 parent 411a1d6 commit d490126
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 d490126

Please sign in to comment.