ÃÛ¶¹ÊÓƵ

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, ÃÛ¶¹ÊÓƵ 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 ÃÛ¶¹ÊÓƵ Commerce UI component, which handles pre-rendering data more efficiently. For instructions, see in the Commerce PHP Extensions Guide.

Affected products and versions

All supported versions of:

  • ÃÛ¶¹ÊÓƵ Commerce on cloud infrastructure
  • ÃÛ¶¹ÊÓƵ 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