Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-inventory-cache
Plugin
InventoryIndexer
Indexer
Source
SourceItemIndexer
CacheFlush.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\InventoryCache\Plugin\InventoryIndexer\Indexer\Source\SourceItemIndexer
;
9
10
use
Magento\InventoryCache\Model\FlushCacheByProductIds
;
11
use
Magento\InventoryIndexer\Model\ResourceModel\GetProductIdsBySourceItemIds
;
12
use
Magento\InventoryIndexer\Indexer\SourceItem\SourceItemIndexer
;
13
17
class
CacheFlush
18
{
22
private
$flushCacheByIds;
23
27
private
$getProductIdsBySourceItemIds;
28
33
public
function
__construct
(
34
FlushCacheByProductIds
$flushCacheByIds,
35
GetProductIdsBySourceItemIds
$getProductIdsBySourceItemIds
36
) {
37
$this->flushCacheByIds = $flushCacheByIds;
38
$this->getProductIdsBySourceItemIds = $getProductIdsBySourceItemIds;
39
}
40
50
public
function
afterExecuteList
(
SourceItemIndexer
$subject,
$result
, array $sourceItemIds)
51
{
52
$productIds
= $this->getProductIdsBySourceItemIds->execute($sourceItemIds);
53
$this->flushCacheByIds->execute(
$productIds
);
54
}
55
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\InventoryCache\Plugin\InventoryIndexer\Indexer\Source\SourceItemIndexer\CacheFlush\afterExecuteList
afterExecuteList(SourceItemIndexer $subject, $result, array $sourceItemIds)
Definition:
CacheFlush.php:50
Magento\InventoryIndexer\Indexer\SourceItem\SourceItemIndexer
Definition:
SourceItemIndexer.php:24
Magento\InventoryCache\Plugin\InventoryIndexer\Indexer\Source\SourceItemIndexer
Definition:
CacheFlush.php:8
Magento\InventoryCache\Plugin\InventoryIndexer\Indexer\Source\SourceItemIndexer\CacheFlush
Definition:
CacheFlush.php:17
Magento\InventoryCache\Model\FlushCacheByProductIds
Definition:
FlushCacheByProductIds.php:16
Magento\InventoryIndexer\Model\ResourceModel\GetProductIdsBySourceItemIds
Definition:
GetProductIdsBySourceItemIds.php:17
$productIds
$productIds
Definition:
product_with_multiple_options.php:11
Magento\InventoryCache\Plugin\InventoryIndexer\Indexer\Source\SourceItemIndexer\CacheFlush\__construct
__construct(FlushCacheByProductIds $flushCacheByIds, GetProductIdsBySourceItemIds $getProductIdsBySourceItemIds)
Definition:
CacheFlush.php:33