File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -518,8 +518,9 @@ public function getIdentities()
518
518
public function getCacheTags ()
519
519
{
520
520
$ identities = $ this ->getIdentities ();
521
+ $ parentTags = parent ::getCacheTags ();
521
522
522
- return ! empty ( $ identities) ? $ identities : parent :: getCacheTags ( );
523
+ return array_unique ( array_merge ( $ identities, $ parentTags ) );
523
524
}
524
525
525
526
/**
Original file line number Diff line number Diff line change @@ -1371,8 +1371,9 @@ public function getIdentities()
1371
1371
public function getCacheTags ()
1372
1372
{
1373
1373
$ identities = $ this ->getIdentities ();
1374
+ $ parentTags = parent ::getCacheTags ();
1374
1375
1375
- return ! empty ( $ identities) ? $ identities : parent :: getCacheTags ( );
1376
+ return array_unique ( array_merge ( $ identities, $ parentTags ) );
1376
1377
}
1377
1378
1378
1379
/**
Original file line number Diff line number Diff line change 18
18
use Magento \Framework \Model \Context ;
19
19
use Magento \Framework \Model \ResourceModel \AbstractResource ;
20
20
use Magento \Framework \Registry ;
21
- use Magento \PageCache \Model \Cache \Type ;
22
21
use Magento \Store \Model \ResourceModel \Store \CollectionFactory ;
23
22
24
23
/**
@@ -608,7 +607,7 @@ public function afterDelete()
608
607
{
609
608
$ this ->_storeManager ->reinitStores ();
610
609
$ types = [
611
- Type:: TYPE_IDENTIFIER ,
610
+ ' full_page ' ,
612
611
Config::TYPE_IDENTIFIER
613
612
];
614
613
foreach ($ types as $ type ) {
@@ -629,7 +628,7 @@ public function afterSave()
629
628
if ($ this ->isObjectNew ()) {
630
629
$ this ->_storeManager ->reinitStores ();
631
630
} else {
632
- $ this ->typeList ->invalidate ([Type:: TYPE_IDENTIFIER , Config::TYPE_IDENTIFIER ]);
631
+ $ this ->typeList ->invalidate ([' full_page ' , Config::TYPE_IDENTIFIER ]);
633
632
}
634
633
$ this ->pillPut ->put ();
635
634
return parent ::afterSave ();
@@ -725,8 +724,9 @@ public function getIdentities()
725
724
public function getCacheTags ()
726
725
{
727
726
$ identities = $ this ->getIdentities ();
727
+ $ parentTags = parent ::getCacheTags ();
728
728
729
- return ! empty ( $ identities) ? $ identities : parent :: getCacheTags ( );
729
+ return array_unique ( array_merge ( $ identities, $ parentTags ) );
730
730
}
731
731
732
732
/**
Original file line number Diff line number Diff line change 10
10
use Magento \Framework \App \Cache \Type \Config ;
11
11
use Magento \Framework \App \Cache \TypeListInterface ;
12
12
use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
13
- use Magento \PageCache \Model \Cache \Type ;
14
13
use Magento \Store \Model \ResourceModel \Website \Collection ;
15
14
use Magento \Store \Model \ScopeInterface ;
16
15
use Magento \Store \Model \StoreManagerInterface ;
@@ -120,7 +119,7 @@ public function testAfterSaveObject()
120
119
121
120
$ this ->typeList ->expects ($ this ->once ())
122
121
->method ('invalidate ' )
123
- ->with ([Type:: TYPE_IDENTIFIER , Config::TYPE_IDENTIFIER ]);
122
+ ->with ([' full_page ' , Config::TYPE_IDENTIFIER ]);
124
123
125
124
$ this ->model ->afterSave ();
126
125
}
@@ -130,7 +129,7 @@ public function testAfterDelete()
130
129
$ this ->typeList ->expects ($ this ->exactly (2 ))
131
130
->method ('cleanType ' )
132
131
->withConsecutive (
133
- [Type:: TYPE_IDENTIFIER ],
132
+ [' full_page ' ],
134
133
[Config::TYPE_IDENTIFIER ]
135
134
);
136
135
Original file line number Diff line number Diff line change 14
14
"magento/module-ui" : " *" ,
15
15
"magento/module-customer" : " *" ,
16
16
"magento/module-authorization" : " *" ,
17
- "magento/module-backend" : " *" ,
18
- "magento/module-page-cache" : " *"
17
+ "magento/module-backend" : " *"
19
18
},
20
19
"suggest" : {
21
20
"magento/module-deploy" : " *"
You can’t perform that action at this time.
0 commit comments