Code Profiler, page cache and custom caches
Which profiler answers which performance question, how the page cache is invalidated (15-minute clear period, partitions, remote includes), when to use relative cache times and varyby, and how to register and use a custom cache with CacheMgr.
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.
~7 min read · 9 practice questions ·
What the exam expects
- Pick the Pipeline Profiler or a Code Profiler mode for a performance question, and read its data correctly.
- Explain what invalidates the page cache, why repeated invalidation backfires, and how partitions and remote includes interact.
- Replace a daily cache expiry with relative cache times, and mark price- and promotion-dependent pages with
varyby="price_promotion". - Register a custom cache and use
Cache.get(key, loader), knowing what can and can't be stored.
Key terms: Pipeline Profiler (Business Manager view of hits, total and average time per controller and script); Code Profiler (run-time profiler with three modes and exportable data); page cache (web server copies of pages built from ISML templates); clear period (the 15 minutes over which an invalidation evicts the cache); page cache partition (a group of pipelines invalidated together); custom cache (a cartridge-registered key-value cache read through CacheMgr).
Key facts
- Detail
- Pipeline Profiler: high average time plus high hits
- Detail
- Default on non-sandbox instances, can't be deactivated
- Detail
- Default on sandboxes, all requests
- Detail
- Per application server; exported hourly to CSV, then reset
- Detail
- 15 minutes; each new invalidation resets it
- Detail
- 10 partitions, 20 pipelines each, one partition per pipeline
- Detail
- Not invalidated with the containing pipeline
daily time zone- Detail
- GMT
varyby value- Detail
price_promotiononly
- Detail
cachesentry in the cartridge'spackage.json
undefined- Detail
- Nothing is stored
Sources for this section (6)
- Troubleshooting Salesforce B2C Commerce Performancedeveloper.salesforce.com (opens in a new tab)
- Site Performancedeveloper.salesforce.com (opens in a new tab)
- Content Cachedeveloper.salesforce.com (opens in a new tab)
- iscache Elementdeveloper.salesforce.com (opens in a new tab)
- Class CacheMgrdeveloper.salesforce.com (opens in a new tab)
- Class Cachedeveloper.salesforce.com (opens in a new tab)
- When does the Pipeline Profiler stop supplying script-level data?
- Why must you reproduce the slow behaviour on a sandbox after switching Code Profiler modes?
- What does calling put with an undefined value do to a custom cache entry?
- Why should the cache settings be replicated to production only when the partitions change?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the B2C Commerce Developer pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 28 lessons of the B2C Commerce Developer guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Practice exams purchase adds inline bank questions and topic practice (9 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Choose guide-only, practice-only, or save $4 with both