Salesforce-B2C-Commerce-Cloud-Developer Practice Test
Salesforce Spring 25 Release 202 Questions
Given a template rendered by a controller with caching and a remote include without
caching, which situation applies?
A. Both the remote include portion and the rest of the page are cached.
B. The remote include portion is not cached, but the rest of the page is cached.
C. The page is cached only for returning customers because of the remote include.
D. The page is not cached because the remote include introduces an uncached portion.
B. The remote include portion is not cached, but the rest of the page is cached.
Explanation:
Controller-Level Caching:
When a controller uses caching (e.g., cache.applyDefaultCache), the main page content is cached.
This cached content includes all static parts of the template.
Remote Includes:
Remote includes (< isinclude > or remote service calls) are not cached by default unless explicitly configured.
They are fetched fresh on each request, even if the surrounding page is cached.
Resulting Behavior:
The main page structure (cached portions) is served from cache.
The remote include portion is dynamically generated for each request.
Why Not Other Options?
A: Incorrect - Remote includes don't inherit the parent page's cache.
C: Incorrect - Caching isn't customer-specific in this scenario.
D: Incorrect - The page is still cached; only the remote portion is dynamic.
Key Takeaway:
This hybrid approach is common for pages needing both performance (caching) and real-time data (uncached includes).