Document Properties
Kbid
24746A
Last Modified
11-Aug-2020
Added to KB
20-Jun-2013
Public Access
Everyone
Status
Online
Doc Type
References
Product
  • ICM 7.10
  • ICM 11
ISML Tag - ISCACHEKEY

Name

ISCACHEKEY

Short Description

deletes page cache according to keyword or object

Table of Contents

Product Version

6.5

Product To Version


StatusNew Labels

Introduction

Cache keys are used for selective page cache deletion. Using the <ISCACHEKEY> tag you can provide keywords or objects which you can use to invalidate page cache entries.
Via <ISCACHEKEY> tags you can assign keywords to a specific storefront template. This keyword can be used to invalidate those pages that are based on the template to which the keyword has been assigned. Use either a pipelet or the <ISCACHEKEY> tag for invalidating page caching selectively. Refer to the section Page Cache Deletion of the Application Programming Guide for more information on how to implement an AddPagecacheKeyword pipelet.

Note

Do not hold too many pages in cache (e.g., one million) and use too many keywords per page (e.g., 10 keywords). Otherwise, the performance of your system will decrease significantly.

Syntax

<iscachekey
(
keyword = "( {String} | {ISML expression} )"
object = "( {String} | {ISML expression} )"
)>

Example

The first example shows how to bind the PrimeTechSpecials_hotdeals keyword to the current page (= the URL that requested the page):

ISCACHEKEY keyword="PrimeTechSpecials_hotdeals"

For every incoming request, the Web Adapter generates a URL hash and sends it to the application server. The application server uses this hash to assign the keyword to the request URL. The keyword is simply added to the Intershop 7 URL.
If an Intershop 7 pipeline recognizes a keyword, all pages that are generated by calling the pipeline are removed from the cache.
When you invalidate the keyword, the page is removed from the cache (see section Page Cache Deletion of the Application Programming Guide for more information).
The second example shows how to assign a number of product-related keywords to the product_item_1 template:

<!-- TemplateName : product_item_1.isml -->
<iscache type="relative" hour="48">
<iscachekey keyword="product_item_1">
<iscachekey keyword="#Product:SKU#">
<iscachekey keyword="#Product:Name#">

In the example, the template contains a static keyword ( product_item_1) and two dynamic keywords ( Product:SKU, Product:Name). If you change the specified product details (e.g., SKU, name), all pages that are based on the product_item_1 template are removed from the cache, and hence can be updated regularly.

Note

Keywords of static content are automatically assigned to images via the path name.

The attribute object provides a way to create several keywords and assign them to a template.
An example of a Java class that can convert an object to keywords is com.intershop.sellside.appbase.b2c.internal.pagecache.ProductBOCacheClearKeyProvider. This Java class uses the object ProductBO and generates keywords.

<iscachekey object="#ProductBO#">

By doing this, the same keywords are generated when one used the following tags.

<iscachekey keyword="com.the.java.className">
<iscachekey keyword="com.the.java.productInterfaceName">
<iscachekey keyword="#ProductBO:SKU#">
<iscachekey keyword="#ProductBO:UUID#">

The consistency is increased, since all the keywords of an object are known and are identical for every web page which uses a template to which the <ISCACHEKEY> is assigned. Moreover, you do not have to write so many <ISCACHEKEY> statements.
Additionally, it is easy to find the necessary keywords for cache invalidation, as this is done by the same Java class.

Attributes

One of the following attributes is required.

Note

Use only one of the two allowed attributes in a single <ISCACHEKEY> tag. To create multiple conditions for selective page cache deleting, use multiple <ISCACHEKEY> tags.

keyword

keyword = "( { String} | { ISML expression} )"
String or ISML expression for defining a value. A value uses the Unicode standard. Its length must not exceed 2000 byte.

object

object = "( { String} | { ISML expression} )"
String or ISML expression for defining a value. A value uses the Unicode standard. Its length must not exceed 2000 byte.

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.