Document Properties
Kbid
24M747
Last Modified
04-Feb-2020
Added to KB
20-Jun-2013
Public Access
Everyone
Status
Online
Doc Type
References
Product
  • ICM 7.10
  • ICM 11
ISML Tag - ISCACHE

Name

ISCACHE

Short Description

defines time period of a storefront page in the cache

Table of Contents

Product Version

6.5

Product To Version

 

Status

Introduction

To improve the performance of the online storefront, the template designer can direct the system to hold specific storefront pages in a cache.
The requested storefront page is retrieved from the cache without running the pipeline that invokes the template and generates the desired page. For more information about page caching and page caching restrictions, refer to the section Page Caching of the Application Programming Guide.
If you want a storefront page to be cached after the Java class file is generated in response to the first request for the template, you must invoke the <ISCACHE> tag in the template. The tag allows you to specify when the cached page should expire from the cache; after a fixed period of time or daily at a particular time.
The tag can be located anywhere in the template. See section Page Caching of the Application Programming Guide for a discussion on the interaction between page caching and ISML template inclusion.

Syntax

<iscache
type = "( relative | daily | forbidden )"
[ hour = "( {Integer} | {ISML expression} )" ]
[ minute = "( {Integer} | {ISML expression} )" ]
>

Note

Limited expiration date since 7.6.1.2

IMPORTANT: The cache expire time and date is set to the 19.1.2038 if the set hour and minutes values results in a later date. This is necessary to match the data type limitations of the Web Adapter. This limitation is introduced with version 7.6.1.2 and applies to later versions.

Note

When specifying time, the 24 hour clock is used. This means that 0 is equal to midnight, 1 is equal to 1 am, 2 is equal to 2 am, etc., up to 2359, which is equal to 11:59 pm.

Note

Publishing and visibility dates of the CMS are automatically evaluated and used to set cache expiration dates whenever CMS content is rendered in the storefront.

The caching on publishing and visibility dates will also happen if no caching behavior is set in ISML via <ISCACHE> tag.
In this regard it is important to know that not setting any <ISCACHE> tag is not the same as setting <ISCACHE type = "forbidden">. <ISCACHE type = "forbidden"> is not the default behavior, but if nothing else is set via <ISCACHE> tag or via CMS publishing and visibility dates, nothing will be cached. Setting <ISCACHE type = "forbidden"> explicitly in an ISML template will definitely disable all page caching where such an ISML template is used.

To summarize the default caching behavior is currently:

  • No caching if no statement is done regarding caching
  • CMS publishing and visibility dates are evaluated as a statement for caching until a specific expiration date
  • the lowest of all caching statement times wins
    • <iscache type = "forbidden"> is the "lowest" caching statement possible and will always win
    • BUT: "forbidden" is not the default value if nothing is set!

In case the caching result produced by this default caching rules does not match the expected behavior, it is necessary to explicitly state the expected caching behavior in ISML.

Examples

A page based on a template that contains the following line of code would expire
from the cache after 90 minutes:

<ISCACHE type = "relative" hour = "1" minute = "30">

A page based on a template that contains the following line of code would expire
from the cache every day at 0630 hours (6:30 am):

<ISCACHE type = "daily" hour = "6" minute = "30">

A page based on a template that contains the following line of code would expire
from the cache every day at 2330 hours (11:30 pm):

<ISCACHE type = "daily" hour = "23" minute = "30">

A content component that has a publishing or visible date is always page cached, even if no <iscache> tag is used. Details are explained in a Note above. If page caching should be avoided in such case, explicitly set the <iscache> tag to "forbidden" in the related ISML template:

<ISCACHE type = "forbidden">

Attributes

type

The type attribute is required:
type = relative | daily | forbidden

relative allows you to specify a certain period of time, in minutes and hours, after which the page will be deleted from the cache.
daily allows you to specify a specific time when the page will be deleted from the cache.
forbidden allows you to explicitly exclude the template from being cached. This helps to make sure that no non-cacheable content is stored in the page cache even in complex ISML include structures.

Note

If multiple <ISCACHE> tags of the type daily or relative exist, the one with the shortest caching period takes precedence.

hour

This attribute is optional.
hour = integer

If the type attribute is set to daily, the hour value must be an integer ranging from 0 to 23. If type is set to relative, all integer values greater than or equal to 0 are valid (the default value is 0, meaning that either the page is never cached or only the minute attribute is relevant).

minute

This attribute is optional.
minute = integer

If the type attribute is set to daily, the minute value must be an integer ranging from 0 to 59. If type is set to relative, all integer values greater than or equal to 0 are valid (the default value is 0, meaning that either the page is never cached or only the hour attribute is relevant).

Reference - ISML Tags

Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.