File tree Expand file tree Collapse file tree 4 files changed +24
-22
lines changed
Model/Config/Cache/Tag/Strategy Expand file tree Collapse file tree 4 files changed +24
-22
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ public function __construct(
33
33
*/
34
34
public function generateTags (ValueInterface $ config ): array
35
35
{
36
- $ tags = [];
36
+ $ tagsArray = [];
37
37
foreach ($ this ->tagGenerators as $ tagGenerator ) {
38
- $ tags = array_merge ( $ tags , $ tagGenerator ->generateTags ($ config) );
38
+ $ tagsArray [] = $ tagGenerator ->generateTags ($ config );
39
39
}
40
- return $ tags ;
40
+ return array_merge (... $ tagsArray ) ;
41
41
}
42
42
}
Original file line number Diff line number Diff line change 5
5
*/
6
6
declare (strict_types=1 );
7
7
8
- namespace Magento \StoreGraphQl \Model \Cache \Tag \Strategy ;
8
+ namespace Magento \Store \Model \ Config \Cache \Tag \Strategy ;
9
9
10
10
use Magento \Framework \App \Cache \Tag \StrategyInterface ;
11
11
use Magento \Framework \App \Config \ValueInterface ;
12
- use Magento \Store \Model \Config \Cache \Tag \Strategy \TagGeneratorInterface ;
13
12
14
13
/**
15
14
* Produce cache tags for store config.
16
15
*/
17
16
class StoreConfig implements StrategyInterface
18
17
{
19
18
/**
20
- * @var \Magento\Store\Model\Config\Cache\Tag\Strategy\ TagGeneratorInterface
19
+ * @var TagGeneratorInterface
21
20
*/
22
21
private $ tagGenerator ;
23
22
23
+ /**
24
+ * @param TagGeneratorInterface $tagGenerator
25
+ */
24
26
public function __construct (
25
27
TagGeneratorInterface $ tagGenerator
26
28
) {
Original file line number Diff line number Diff line change 457
457
</argument >
458
458
</arguments >
459
459
</type >
460
+ <type name =" Magento\Framework\App\Cache\Tag\Strategy\Factory" >
461
+ <arguments >
462
+ <argument name =" customStrategies" xsi : type =" array" >
463
+ <item name =" Magento\Framework\App\Config\ValueInterface" xsi : type =" object" >
464
+ Magento\Store\Model\Config\Cache\Tag\Strategy\StoreConfig
465
+ </item >
466
+ </argument >
467
+ </arguments >
468
+ </type >
469
+ <type name =" Magento\Store\Model\Config\Cache\Tag\Strategy\StoreConfig" >
470
+ <arguments >
471
+ <argument name =" tagGenerator" xsi : type =" object" >
472
+ Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator
473
+ </argument >
474
+ </arguments >
475
+ </type >
460
476
</config >
Original file line number Diff line number Diff line change 6
6
*/
7
7
-->
8
8
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:ObjectManager/etc/config.xsd" >
9
- <type name =" Magento\Framework\App\Cache\Tag\Strategy\Factory" >
10
- <arguments >
11
- <argument name =" customStrategies" xsi : type =" array" >
12
- <item name =" Magento\Framework\App\Config\ValueInterface" xsi : type =" object" >
13
- Magento\StoreGraphQl\Model\Cache\Tag\Strategy\StoreConfig
14
- </item >
15
- </argument >
16
- </arguments >
17
- </type >
18
- <type name =" Magento\StoreGraphQl\Model\Cache\Tag\Strategy\StoreConfig" >
19
- <arguments >
20
- <argument name =" tagGenerator" xsi : type =" object" >
21
- Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator
22
- </argument >
23
- </arguments >
24
- </type >
25
9
<type name =" Magento\Store\Model\Config\Cache\Tag\Strategy\CompositeTagGenerator" >
26
10
<arguments >
27
11
<argument name =" tagGenerators" xsi : type =" array" >
You can’t perform that action at this time.
0 commit comments