Caching Madisons home page with ESI

Apparently to cache Madisons home page using ESI at http level is a simple task.

But the instructions to follow are quite complicated to line up in a step’s sequence.

I try to resume what you have to do to get it working in WCD 7 environment.

1. Install and configure IHS on your workstation

Deluca explains how to do in this article. I suggest to install the last FP (now 17) for IHS, Plugin and JDK.

2. Install DynacacheESI and Dynacache Monitor applications

It’s better to install the applications on top of WAS and update the Cache monitor to the Extended version.

3. Configure ESI on IHS Plugin

<Property Name="ESIEnable" Value="true"/>
<Property Name="ESIMaxCacheSize" Value="1024"/>
<Property Name="ESIInvalidationMonitor" Value="true"/>

4. Configure IHS process to work with ESI

On windows there is no problem to leave default values but on Linux you have to remember to limit the number of processes (only one is better for ESI)

5. Enable Servlet Caching and verify Cache External groups members on WAS console

This last configuration is very important in a cluster environment where you must have one entry for every remote http server.

5. Modify cachespec.xml

        <property name="consume-subfragments">true</property>
        <property name="EdgeCacheable">true</property>
        <property name="save-attributes">false</property>
        <!-- TopCategoriesDisplay?storeId=<storeId>&catalogId=<catalogId> -->
                <component id="" type="pathinfo">
                <component id="storeId" type="parameter">
                <component id="catalogId" type="parameter">

Until here the setup was quite easy.

Let’s check the results on Cache Monitor using the TopCategories dynamic URL.

This is the initial state on cache monitor

There is no entries on dynacache or ESI.

Calling this URL


the page contents are cached on IHS

and the page is cached at WAS level

Now hitting F5 to reload the page, the request will come directly from the IHS without generating traffic against WAS (look at the cache entry hit)

Done. We are caching pages at IHS level using ESI.


This is working only for dynamic URLs not for the static ones

Search engine optimization (SEO) for WebSphere Commerce Version 7 Feature Pack 2 or earlier

“Static URLs can only use WebSphere dynamic caching at the Application Server”

This means that the corrispondent SEO static URL for Madisons Home Page (OOB in version 7)


CANNOT be cached with ESI at IHS level. And no, this is not solved on FEP 3 :-)

Remember also that

IBM HTTP Server Performance Tuning

“Each child processes uses 1 ESI Invalidation thread (when the feature is configured), and this thread is used synchronously in the web container.”

And you will find this error

[8/20/11 20:47:19:205 CEST] 00000015 ThreadMonitor W   WSVR0605W: Thread "WebContainer : 4" (00000068) has been active for 652414 milliseconds and may be hung.  There is/are 1 thread(s) in total in the server that may be hung.
	at java.lang.Object.wait(Native Method)

on WAS SystemOut for every webcontainer thread connected with ESI invalidation servlet when is not used for a while.


Websphere Commerce and Portal Architect ✔ Motivated IT professional with more than ten years of experience, combining Java and JEE developer skills with systems and IBM products installation knowledge. ✔ Strong experience and skills on planning, architecting and implementing complex commerce and portal solutions based on IBM middleware products. ✔ Reliable with a strong network attitude, experience on leading developer's teams and manage international relationships. Specialties ✔ Pleasant manner, reliable. ✔ Ability to consider issues from different point of views. ✔ End-oriented work capacity and problem-solving attitude. ✔ Ability to work with deadlines and under pressure. ✔ Ability to prioritise tasks and manage people. ✔ Ability to increase the whole team skills. ✔ Ability to generate commercial leads

Posted in cache, was, websphere commerce

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: