Model
LegacyStockStatusStorage
Magento\InventoryCatalog\Model\Cache\LegacyStockStatusStorage
What it does
This class provides a temporary in-memory cache for legacy Magento CatalogInventory stock status data.
Developers use it to avoid repeated database queries for stock status within a single request, improving performance when checking product availability across different scopes (stores/websites).
The cache automatically clears after each request to prevent stale data.
Public Methods
- _resetState()
- get()
- set()
- clean()