If you have whole page cache setup for CategoryDisplay pages or any other pages and one of the eSpots on these pages used for creating web activities and this web activity for content recommendation does work when you visit the page first time and once it is cached next hit to this page does not display the correct content as per web activity evaluation logic then possible cause could be your cachespec.xml config issue. Make sure that cache-entry for CategoryDisplay cache-id or any other cache-id setup for whole page cache (i.e. consume-subfragments is set to true) below attributes highlighted in RED colour are excluded from save-attributes= false property list.
<cache-entry>
<class>servlet</class>
<name>com.ibm.commerce.struts.ECActionServlet.class</name>
<property name="consume-subfragments">true</property>
<property name="save-attributes">false
<exclude>jspStoreDir</exclude>
<exclude>javax.servlet.forward.path_info</exclude>
<exclude>requestURIPath</exclude>
<exclude>requestServletPath</exclude>
</property>
<cache-id>
<component id="" type="pathinfo">
<value>/CategoryDisplay</value>
<required>true</required>
</component>
<component id="storeId" type="parameter">
<required>true</required>
</component>
<component id="catalogId" type="parameter">
<required>true</required>
</component>
<component id="DC_lang" type="attribute">
<required>true</required>
</component>
<component id="categoryId" type="parameter">
<required>true</required>
</component>
<component id="top_category" type="parameter">
<required>false</required>
</component>
<component id="parent_category_rn" type="parameter">
<required>false</required>
</component>
</cache-id>
<cache-entry>
Issue is that if whole page is cached then request to that page will be served directly from dynacache sever and backend controller command will not be executed. In this case WCS marketing engine uses command URL (e.g. CategoryDisplay) to execute the web activity target condition and for this to be executed correctly cached page must persist above mentioned request attributes for each category. This is specially applicable for web activities where target conditions are like customer views a specific category for example brake pads then recommend some content for eSpot.
<cache-entry>
<class>servlet</class>
<name>com.ibm.commerce.struts.ECActionServlet.class</name>
<property name="consume-subfragments">true</property>
<property name="save-attributes">false
<exclude>jspStoreDir</exclude>
<exclude>javax.servlet.forward.path_info</exclude>
<exclude>requestURIPath</exclude>
<exclude>requestServletPath</exclude>
</property>
<cache-id>
<component id="" type="pathinfo">
<value>/CategoryDisplay</value>
<required>true</required>
</component>
<component id="storeId" type="parameter">
<required>true</required>
</component>
<component id="catalogId" type="parameter">
<required>true</required>
</component>
<component id="DC_lang" type="attribute">
<required>true</required>
</component>
<component id="categoryId" type="parameter">
<required>true</required>
</component>
<component id="top_category" type="parameter">
<required>false</required>
</component>
<component id="parent_category_rn" type="parameter">
<required>false</required>
</component>
</cache-id>
<cache-entry>
Issue is that if whole page is cached then request to that page will be served directly from dynacache sever and backend controller command will not be executed. In this case WCS marketing engine uses command URL (e.g. CategoryDisplay) to execute the web activity target condition and for this to be executed correctly cached page must persist above mentioned request attributes for each category. This is specially applicable for web activities where target conditions are like customer views a specific category for example brake pads then recommend some content for eSpot.
No comments:
Post a Comment