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 18.104.22.168 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
<cache-entry> <class>servlet</class> <name>com.ibm.commerce.struts.ECActionServlet.class</name> <property name="consume-subfragments">true</property> <property name="EdgeCacheable">true</property> <property name="save-attributes">false</property> <!-- TopCategoriesDisplay?storeId=<storeId>&catalogId=<catalogId> --> <cache-id> <component id="" type="pathinfo"> <required>true</required> <value>/TopCategoriesDisplay</value> </component> <component id="storeId" type="parameter"> <required>true</required> </component> <component id="catalogId" type="parameter"> <required>true</required> </component> </cache-id> <cache-entry>
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
“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
“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.