Log in
Model

RegionModelsCache

Magento\Customer\Model\Address\AbstractAddress\RegionModelsCache

What it does

This class provides a simple in-memory cache for storing and retrieving Directory Region model objects.

Developers use it to avoid repeatedly loading the same region data from the database during a single request, improving performance when working with customer addresses that reference the same regions multiple times.

The cache automatically resets after each request via the ResetAfterRequestInterface.

Public Methods

  • _resetState()
  • add()
  • get()