Log in
Model

CountryModelsCache

Magento\Customer\Model\Address\AbstractAddress\CountryModelsCache

What it does

This class provides a temporary cache for storing and retrieving Country model objects during customer address operations.

Developers use it to avoid repeatedly loading the same country data from the database within a single request, improving performance when processing multiple addresses.

The cache automatically resets after each request to prevent memory buildup.

Public Methods

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