Model
RateRegistry
Magento\Tax\Model\Calculation\RateRegistry
What it does
This class serves as an in-memory registry/cache for tax rate models in Magento 2.
Developers use it to store, retrieve, and remove tax rate instances during a request lifecycle, avoiding redundant database queries when the same tax rate is needed multiple times.
It's primarily used internally by the Tax module to improve performance when working with tax calculations.
Public Methods
- registerTaxRate()
- retrieveTaxRate()
- removeTaxRate()