66
77namespace Magento \Catalog \Model \Indexer \Product \Price ;
88
9- use Magento \Catalog \Model \Product ;
109use Magento \Catalog \Model \Product \Type ;
1110use Magento \Catalog \Model \ResourceModel \Product \Indexer \Price \DefaultPrice ;
1211use Magento \Catalog \Model \ResourceModel \Product \Indexer \Price \Factory ;
2120use Magento \Framework \Exception \InputException ;
2221use Magento \Framework \Exception \LocalizedException ;
2322use Magento \Framework \Exception \NoSuchEntityException ;
24- use Magento \Framework \Indexer \CacheContext ;
2523use Magento \Framework \Indexer \DimensionalIndexerInterface ;
2624use Magento \Framework \Search \Request \Dimension ;
2725use Magento \Framework \Stdlib \DateTime ;
@@ -63,6 +61,8 @@ abstract class AbstractAction
6361 protected $ _storeManager ;
6462
6563 /**
64+ * Currency factory
65+ *
6666 * @var CurrencyFactory
6767 */
6868 protected $ _currencyFactory ;
@@ -83,6 +83,8 @@ abstract class AbstractAction
8383 protected $ _catalogProductType ;
8484
8585 /**
86+ * Indexer price factory
87+ *
8688 * @var Factory
8789 */
8890 protected $ _indexerPriceFactory ;
@@ -107,11 +109,6 @@ abstract class AbstractAction
107109 */
108110 private $ tableMaintainer ;
109111
110- /**
111- * @var CacheContext
112- */
113- private $ cacheContext ;
114-
115112 /**
116113 * @param ScopeConfigInterface $config
117114 * @param StoreManagerInterface $storeManager
@@ -124,7 +121,6 @@ abstract class AbstractAction
124121 * @param TierPrice|null $tierPriceIndexResource
125122 * @param DimensionCollectionFactory|null $dimensionCollectionFactory
126123 * @param TableMaintainer|null $tableMaintainer
127- * @param CacheContext|null $cacheContext
128124 * @SuppressWarnings(PHPMD.NPathComplexity)
129125 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
130126 * @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -140,8 +136,7 @@ public function __construct(
140136 DefaultPrice $ defaultIndexerResource ,
141137 TierPrice $ tierPriceIndexResource = null ,
142138 DimensionCollectionFactory $ dimensionCollectionFactory = null ,
143- TableMaintainer $ tableMaintainer = null ,
144- CacheContext $ cacheContext = null
139+ TableMaintainer $ tableMaintainer = null
145140 ) {
146141 $ this ->_config = $ config ;
147142 $ this ->_storeManager = $ storeManager ;
@@ -153,15 +148,14 @@ public function __construct(
153148 $ this ->_defaultIndexerResource = $ defaultIndexerResource ;
154149 $ this ->_connection = $ this ->_defaultIndexerResource ->getConnection ();
155150 $ this ->tierPriceIndexResource = $ tierPriceIndexResource ?? ObjectManager::getInstance ()->get (
156- TierPrice::class
157- );
151+ TierPrice::class
152+ );
158153 $ this ->dimensionCollectionFactory = $ dimensionCollectionFactory ?? ObjectManager::getInstance ()->get (
159- DimensionCollectionFactory::class
160- );
154+ DimensionCollectionFactory::class
155+ );
161156 $ this ->tableMaintainer = $ tableMaintainer ?? ObjectManager::getInstance ()->get (
162- TableMaintainer::class
163- );
164- $ this ->cacheContext = $ cacheContext ?? ObjectManager::getInstance ()->get (CacheContext::class);
157+ TableMaintainer::class
158+ );
165159 }
166160
167161 /**
@@ -397,7 +391,6 @@ protected function _reindexRows($changedIds = [])
397391
398392 if ($ changedIds ) {
399393 $ this ->deleteIndexData ($ changedIds );
400- $ this ->cacheContext ->registerEntities (Product::CACHE_TAG , $ changedIds );
401394 }
402395
403396 $ typeIndexers = $ this ->getTypeIndexers ();
0 commit comments