Page Caching

Caching for Page Designer pages is similar to other pages, with some nuances.

Components Aren't Cached Separately

If you set an iscache value for a component on a page, that value affects the caching for the whole page. If different iscache values are set for different components on the page, the shortest iscache value is used for caching the entire page.

If you want to cache a component separately, use a remote include to bring the component into the page.

Page Rendering Uses Nested Remote Includes to Handle Visibility Rules

When PageMgr.renderPage() renders a Page Designer page, the rendering process uses two nested remote includes:

Each variation of the page based on different visibility settings is cached separately.

If you check caching for the the first-level remote include, all pages appear uncached. The second-level remote include maintains caching statistics for Page Designer pages, but those caching statistics track caching for all Page Designer pages. If you have several Page Designer pages, for example, a home page and a Product Detail page, you can't track caching separately per page.

A controller that you use to render the page, such as Page-Show, is typically uncached. For example, the Page.js controller from the SFRA Page Designer reference components uses the following snippet to check if the page is visible. Only pages with no visibility rules are cached.

server.append('Show', consentTracking.consent, function (req, res, next) {
    var page = PageMgr.getPage(req.querystring.cid);
    var params = {};
    if (page != null && page.isVisible()) {
        if (!page.hasVisibilityRules()) {
            var ONE_WEEK = new Date().getTime() + 7 * 24 * 60 * 60 * 1000;
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.