Cert++
Close

Personalized page caching trade-offs

Key Takeaway

Personalized caching splits a URL's cache entries by price books and promotions, not by profile attributes. To cache a different version of a page for one shopper group, tie that version to a price book or promotion that only that group qualifies for, and call response.setVaryBy('price_promotion').

The page cache normally stores one response per URL, so every shopper who requests that URL gets the same page. Personalized caching lets B2C Commerce keep several cached copies of the same URL, one for each combination of active price books and applicable promotions. Shoppers who see different prices can still get fast cached pages. The cost is more cache entries per URL and less reuse of each entry, so turn it on only when a response really varies by price or promotion.

How the page cache finds a response

The page cache sits in the web server layer and is a key-value store. The key is the full URL, including the query string. The value is the cached page.

A request served from the page cache puts no load on the application or storage layers. Because the key is the URL, every shopper who requests the same URL normally gets the same cached response.

B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Given a problem or performance issue and data, use relevant tools to inspect code performance and determine and implement solutions (cache configuration, profilers, etc.) to resolve this issue

0/11

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other B2C Commerce Developer studiers.