Log in
Model

CachedMetadata

Magento\Customer\Model\Metadata\CachedMetadata

What it does

This class acts as a caching wrapper for customer and customer address attribute metadata in Magento 2.

It intercepts calls to retrieve attribute metadata and checks the cache first before fetching from the database, significantly improving performance when working with customer attributes.

Developers use this indirectly through dependency injection when they need to access customer attribute definitions, validation rules, and form configurations.

Public Methods

  • getAttributes()
  • getAttributeMetadata()
  • getAllAttributesMetadata()
  • getCustomAttributesMetadata()