Page Caching in Templates

⚠️ The annual cost of maintaining the server where this website is hosted, the domain, and keeping it up-to-date is approximately €3,000 per year. Help us with a small donation to cover these expenses. Support Now!

0 / 10000

Page caching is when pages (or parts of pages) are stored for immediate browser display, without having to call the server.

The nature of the Internet is that a page is served to the browser, then the connection to the server is dropped.

You can easily design a site that caches portions of pages for data that doesn't change frequently or is generic (not dependent on who is viewing the page). By caching portions of pages, merchants can manage the customer experience, while satisfying business requirements related to timely data changes such as pricing and promotions.

Note: Pipeline caching is site based. If you turn off pipeline caching, you turn it off for all pipelines for that site.

B2C Commerce Web Server Page Caching

B2C Commerce uses the B2C Commerce Web Server to perform page caching.

  1. A browser client makes a request to the B2C Commerce Web Server. Because the page isn't in the cache, the request is dispatched to the Application Server.
  2. The Application Server returns the page to the B2C Commerce Web Server. The B2C Commerce Web Server caches the page and returns the page to client.
  3. The client makes a request to the B2C Commerce Web Server for the same page.
  4. B2C Commerce Web Server finds the page in the cache and delivers it to the client.

Cacheable vs. Dynamic Requests

All the data served to a browser doesn't have to be resent each time a button is clicked or an entry made in a field. Some content (often, most of it) can be cached for immediate redisplay. Web page elements such as HTML headings and text, images called with HTML tags, and any other part of the page that is unlikely to change, can be cached. This content is considered static.

By contrast, when ISML tags call variables to generate a specific list at run time (for example, a list of products), they look up object properties in the Pipeline Dictionary to present product details or other session-dependent data on-the-fly. This content is dynamic in that it changes each time a request is made from the browser.

URLs are also dynamic because the system uses them at run time to compose content that changes from session to session.

Implementing Page Caching

You can enable page caching in Business Manager; and use the <iscache> ISML tag within a template to control what parts of a page are cached and for how long.