Cert++
Close

iscache tag settings and the effective page cache

Key Takeaway

The most restrictive <iscache> tag in a page template and its locally included templates sets the cache for the whole page. To cache a fragment for a shorter time than its page, serve it through a remote include, which is a separate request with its own caching.

The <iscache> ISML tag tells B2C Commerce to store the HTML page built from a template in the web server's page cache. The tag also sets when the cached copy expires. Cached pages are returned almost instantly because the server skips the controller and templates. When a page has several <iscache> tags, B2C Commerce combines them into one effective cache policy for the whole page. The most restrictive tag wins.

How the page cache works

A page is cached only if its template has an <iscache> tag, or if the controller sets caching through the Response setExpires methods. Page caching must also be enabled for the site in Business Manager. If page caching is not enabled, the <iscache> tag is ignored.

The first request for a page is generated dynamically. After that, the page can be cached. Later requests served from the cache bypass the controller, so no ISML templates are processed. A cached page therefore behaves more like a static page than a dynamic one.

On production instances, the page cache can't be disabled. To see template changes immediately, disable page caching on sandbox and staging instances.

B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Given a development task, code ISML templates that use functionality, such as local include, remote include, components, and other ISML tags

0/14

Prepare for the Exam

Play Today's Certle

Study Community

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