Log in
Model

CachedMetadata

Magento\Customer\Model\Metadata\CachedMetadata

What it does

This class acts as a caching decorator for customer attribute metadata operations in Magento 2.

It wraps another metadata service and caches the results of attribute queries (like getAttributes, getAttributeMetadata) to improve performance by avoiding repeated database lookups.

Developers typically don't instantiate this directly - it's used internally by Magento's dependency injection to optimize metadata retrieval for customer and address attributes.

Public Methods

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