Log in
Model

AddressRegistry

Magento\Customer\Model\AddressRegistry

What it does

AddressRegistry acts as an in-memory cache for customer address models in Magento 2.

Developers use this class to efficiently retrieve, store, and manage Address model instances during a request lifecycle, avoiding redundant database queries when the same address is accessed multiple times.

It automatically loads addresses from the database on first access and maintains them in memory for subsequent retrievals.

Public Methods

  • retrieve()
  • remove()
  • push()
  • _resetState()