File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed
app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,10 @@ public function afterSave()
94
94
if ($ this ->isValueChanged ()) {
95
95
$ this ->updateSuffixForUrlRewrites ();
96
96
if ($ this ->isCategorySuffixChanged ()) {
97
- $ this ->invalidateCategoryRelatedCache ();
97
+ $ this ->cacheTypeList ->invalidate ([
98
+ \Magento \Framework \App \Cache \Type \Block::TYPE_IDENTIFIER ,
99
+ \Magento \Framework \App \Cache \Type \Collection::TYPE_IDENTIFIER
100
+ ]);
98
101
}
99
102
}
100
103
return parent ::afterSave ();
@@ -105,25 +108,12 @@ public function afterSave()
105
108
*
106
109
* @return bool
107
110
*/
108
- protected function isCategorySuffixChanged ()
111
+ private function isCategorySuffixChanged ()
109
112
{
110
- return $ this ->isValueChanged ()
113
+ return $ this ->isValueChanged ()
111
114
&& ($ this ->getPath () == CategoryUrlPathGenerator::XML_PATH_CATEGORY_URL_SUFFIX );
112
115
}
113
116
114
- /**
115
- * Invalidate cache that store old category suffix
116
- *
117
- * @return void
118
- */
119
- protected function invalidateCategoryRelatedCache ()
120
- {
121
- $ this ->cacheTypeList ->invalidate ([
122
- \Magento \Framework \App \Cache \Type \Block::TYPE_IDENTIFIER ,
123
- \Magento \Framework \App \Cache \Type \Collection::TYPE_IDENTIFIER
124
- ]);
125
- }
126
-
127
117
/**
128
118
* Update suffix for url rewrites
129
119
*
You can’t perform that action at this time.
0 commit comments