@@ -24,28 +24,16 @@ class Store
2424 public function afterGetIdentities (\Magento \Store \Model \Store $ subject , array $ result ): array
2525 {
2626 $ result [] = sprintf ('%s_%s ' , ConfigIdentity::CACHE_TAG , $ subject ->getId ());
27- $ origStoreGroupId = $ subject ->getOrigData ('group_id ' );
28- $ origIsActive = $ subject ->getOrigData ('is_active ' );
29- // An existing active store switches store group
30- if ($ origIsActive && $ this ->isStoreGroupSwitched ($ subject )) {
31- $ origWebsiteId = $ subject ->getOrigData ('website_id ' );
32- $ result [] = sprintf ('%s_%s ' , ConfigIdentity::CACHE_TAG , 'website_ ' . $ origWebsiteId );
33- $ result [] = sprintf (
34- '%s_%s ' ,
35- ConfigIdentity::CACHE_TAG ,
36- 'website_ ' . $ origWebsiteId . 'group_ ' . $ origStoreGroupId
37- );
38- }
3927
40- // New active store or newly activated store or an active store switched store group
41- $ storeGroupId = $ subject ->getStoreGroupId ();
4228 $ isActive = $ subject ->getIsActive ();
29+ // New active store or newly activated store or an active store switched store group
4330 if ($ isActive
4431 && ($ subject ->getOrigData ('is_active ' ) !== $ isActive || $ this ->isStoreGroupSwitched ($ subject ))
4532 ) {
4633 $ websiteId = $ subject ->getWebsiteId ();
4734 if ($ websiteId !== null ) {
4835 $ result [] = sprintf ('%s_%s ' , ConfigIdentity::CACHE_TAG , 'website_ ' . $ websiteId );
36+ $ storeGroupId = $ subject ->getStoreGroupId ();
4937 if ($ storeGroupId !== null ) {
5038 $ result [] = sprintf (
5139 '%s_%s ' ,
0 commit comments