Model

CacheCleaner

Magento\CatalogInventory\Model\Indexer\Stock\CacheCleaner

What it does

This class optimizes cache cleaning during stock indexing by only invalidating product and category caches when stock status actually changes.

Developers use this to prevent unnecessary cache flushes and improve performance during inventory updates by comparing stock statuses before and after reindexing operations.

Public Methods

  • clean()