Log in
Model

GetStockBySalesChannelCache

Magento\InventorySales\Model\GetStockBySalesChannelCache

What it does

This class acts as a caching layer for retrieving stock information by sales channel in Magento's Multi-Source Inventory (MSI).

It stores stock data keyed by sales channel code and type to avoid redundant database queries within a single request.

Developers benefit from this automatically when working with inventory operations, as it improves performance by caching stock-to-sales-channel mappings.

Public Methods

  • _resetState()
  • execute()