di.xml 1.2 KB

12345678910111213141516171819202122232425
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  9. <type name="Magento\InventoryIndexer\Indexer\Stock\StockIndexer">
  10. <plugin name="invalidate_products_cache" type="Magento\InventoryCache\Plugin\InventoryIndexer\Indexer\Stock\StockIndexer\CacheFlush"/>
  11. </type>
  12. <type name="Magento\InventoryIndexer\Indexer\SourceItem\SourceItemIndexer">
  13. <plugin name="invalidate_products_cache" type="Magento\InventoryCache\Plugin\InventoryIndexer\Indexer\Source\SourceItemIndexer\CacheFlush"/>
  14. </type>
  15. <type name="Magento\InventoryCache\Model\ResourceModel\GetProductIdsByStockIds">
  16. <arguments>
  17. <argument name="productTableName" xsi:type="string">catalog_product_entity</argument>
  18. </arguments>
  19. </type>
  20. <type name="Magento\InventoryCache\Model\FlushCacheByProductIds">
  21. <arguments>
  22. <argument name="productCacheTag" xsi:type="const">Magento\Catalog\Model\Product::CACHE_TAG</argument>
  23. </arguments>
  24. </type>
  25. </config>