Caching with A/B Testing

Salesforce B2C Commerce provides different page caching configurations. If you apply personalized prices in an A/B test via promotions, you must use the personalization parameter <varyby="price_promotion"> in the iscache tag of the corresponding templates to ensure the personalized pages are cached properly. We recommend, as a best practice, that you cache whenever possible. Uncached catalog, product or search pages - whether A/B testing pages or regular pages - are not recommended because they degrade performance.

For example, you can use the following in your template if you apply personalized prices in an A/B test via promotions :

<iscache type="relative" minute="30" varyby="price_promotion"/>

By definition, the control group must contain no customization. If you introduce a custom experience for a control group, the pipeline/template containing the customization is no longer cacheable.

Related Links

A/B Testing for Developers

iscache

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.