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()
518518 public function getCacheTags ()
519519 {
520520 $ identities = $ this ->getIdentities ();
521+ $ parentTags = parent ::getCacheTags ();
521522
522- return ! empty ( $ identities) ? $ identities : parent :: getCacheTags ( );
523+ return array_unique ( array_merge ( $ identities, $ parentTags ) );
523524 }
524525
525526 /**
Original file line number Diff line number Diff line change @@ -1371,8 +1371,9 @@ public function getIdentities()
13711371 public function getCacheTags ()
13721372 {
13731373 $ identities = $ this ->getIdentities ();
1374+ $ parentTags = parent ::getCacheTags ();
13741375
1375- return ! empty ( $ identities) ? $ identities : parent :: getCacheTags ( );
1376+ return array_unique ( array_merge ( $ identities, $ parentTags ) );
13761377 }
13771378
13781379 /**
Original file line number Diff line number Diff line change 1818use Magento \Framework \Model \Context ;
1919use Magento \Framework \Model \ResourceModel \AbstractResource ;
2020use Magento \Framework \Registry ;
21- use Magento \PageCache \Model \Cache \Type ;
2221use Magento \Store \Model \ResourceModel \Store \CollectionFactory ;
2322
2423/**
@@ -608,7 +607,7 @@ public function afterDelete()
608607 {
609608 $ this ->_storeManager ->reinitStores ();
610609 $ types = [
611- Type:: TYPE_IDENTIFIER ,
610+ ' full_page ' ,
612611 Config::TYPE_IDENTIFIER
613612 ];
614613 foreach ($ types as $ type ) {
@@ -629,7 +628,7 @@ public function afterSave()
629628 if ($ this ->isObjectNew ()) {
630629 $ this ->_storeManager ->reinitStores ();
631630 } else {
632- $ this ->typeList ->invalidate ([Type:: TYPE_IDENTIFIER , Config::TYPE_IDENTIFIER ]);
631+ $ this ->typeList ->invalidate ([' full_page ' , Config::TYPE_IDENTIFIER ]);
633632 }
634633 $ this ->pillPut ->put ();
635634 return parent ::afterSave ();
@@ -725,8 +724,9 @@ public function getIdentities()
725724 public function getCacheTags ()
726725 {
727726 $ identities = $ this ->getIdentities ();
727+ $ parentTags = parent ::getCacheTags ();
728728
729- return ! empty ( $ identities) ? $ identities : parent :: getCacheTags ( );
729+ return array_unique ( array_merge ( $ identities, $ parentTags ) );
730730 }
731731
732732 /**
Original file line number Diff line number Diff line change 1010use Magento \Framework \App \Cache \Type \Config ;
1111use Magento \Framework \App \Cache \TypeListInterface ;
1212use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
13- use Magento \PageCache \Model \Cache \Type ;
1413use Magento \Store \Model \ResourceModel \Website \Collection ;
1514use Magento \Store \Model \ScopeInterface ;
1615use Magento \Store \Model \StoreManagerInterface ;
@@ -120,7 +119,7 @@ public function testAfterSaveObject()
120119
121120 $ this ->typeList ->expects ($ this ->once ())
122121 ->method ('invalidate ' )
123- ->with ([Type:: TYPE_IDENTIFIER , Config::TYPE_IDENTIFIER ]);
122+ ->with ([' full_page ' , Config::TYPE_IDENTIFIER ]);
124123
125124 $ this ->model ->afterSave ();
126125 }
@@ -130,7 +129,7 @@ public function testAfterDelete()
130129 $ this ->typeList ->expects ($ this ->exactly (2 ))
131130 ->method ('cleanType ' )
132131 ->withConsecutive (
133- [Type:: TYPE_IDENTIFIER ],
132+ [' full_page ' ],
134133 [Config::TYPE_IDENTIFIER ]
135134 );
136135
Original file line number Diff line number Diff line change 1414 "magento/module-ui" : " *" ,
1515 "magento/module-customer" : " *" ,
1616 "magento/module-authorization" : " *" ,
17- "magento/module-backend" : " *" ,
18- "magento/module-page-cache" : " *"
17+ "magento/module-backend" : " *"
1918 },
2019 "suggest" : {
2120 "magento/module-deploy" : " *"
You can’t perform that action at this time.
0 commit comments