Log in
Model

GroupExcludedWebsiteCache

Magento\Customer\Model\Cache\GroupExcludedWebsiteCache

What it does

This class provides in-memory caching for customer group and excluded website relationships in Magento 2.

Developers use it to temporarily store and retrieve website exclusion data for customer groups during a single request lifecycle, improving performance by avoiding repeated database queries.

The cache automatically resets after each request to ensure data freshness.

Public Methods

  • addToCache()
  • getFromCache()
  • isCached()
  • invalidate()
  • _resetState()