Best practices for private content blocks

When a private content block contains the _isScopePrivate variable, the block is not cacheable. Because the private block is not cached, Adobe Commerce must retrieve the same data for each customer request which increases server load.

Instead of using the _isScopePrivate variable for private content, create a block and a template to display user-agnostic data. This data is replaced with user-specific data by the Adobe Commerce UI component, which handles pre-rendering data more efficiently. For instructions, see Private Content in the Commerce PHP Extensions Guide.

Affected products and versions

All supported versions of:

  • Adobe Commerce on cloud infrastructure
  • Adobe Commerce on-premises

Potential performance impact

Sites that have private content blocks containing the _isScopePrivate variables trigger AJAX requests to retrieve the same data for each customer request. This increases response time and uses additional resources that could be used to handle more business-critical storefront operations such as customer registration, shopping cart updates, order submission, and payment transactions.

Additional information

recommendation-more-help
754cbbf3-3a3c-4af3-b6ce-9d34390f3a60