One of the most used features in a Aurora front-end is the category list view using facet filters
To increase the usability of this important feature, it’s mandatory to configure dynacache to handle user interactions with the filters.
When you select a facet like “Color” or “Available Sizes” or you hit the page number to scroll into results, you always execute an AJAX action called “CategoryNavigationResultsView”. For instance if I press the “(Blue)” link in the “Color” facet, this XHR request is generated.
and 78 queries are executed in the background against the DB
Associated to this request, an entry is generated in dynacache and that entry has “ads_f10501_ntk_cs%3A%22Blue%22″ as facet value.
Facet values are the key to correctly cache grid pages because facet parameter is a multi value parameter.
If you now choose “M” in the “Available Sizes” to filter “M” sizes between the blue dresses, facet parameter become an array using 2 values.
The only way to handle this in the dynacache configuration is to use a parameter-list component for the facet
<component id=”facet” type=”parameter-list“>
<required>false</required>
</component>
then the cache-id for the CategoryNavigationResultsView XHR request will be
<cache-id>
<component id=”" type=”pathinfo”>
<required>true</required>
<value>/CategoryNavigationResultsView</value>
</component>
<component id=”storeId” type=”parameter”>
<required>true</required>
</component>
<component id=”langId” type=”parameter”>
<required>true</required>
</component>
<component id=”catalogId” type=”parameter”>
<required>true</required>
</component>
<component id=”categoryId” type=”parameter”>
<required>false</required>
</component>
…
<component id=”facet” type=”parameter-list“>
<required>false</required>
</component>
…
</cache-id>
Using this parameter type, dynacache engine will be able to store all the facet values associated to the request and put them as a key in the cache entry
Cache Entry:
/webapp/wcs/stores/com.ibm.commerce.struts.ECActionServlet.class:pathinfo=/CategoryNavigationResultsView:storeId=10202:langId=-1:catalogId=10051:categoryId=10056:pageView=grid:beginIndex=0:pageSize=12:searchType=:sType=SimpleSearch:resultCatEntryType=:metaData=:orderBy=:orderByContent=:
facet=ads_f10001_ntk_cs%3A%22M%22,ads_f10501_ntk_cs%3A%22Blue%22:
filterFacet=:manufacturer=:minPrice=:maxPrice=:contentBeginIndex=0:isHistory=false:productBeginIndex=0:requesttype=ajax:objectId=:resultType=products:searchTerm=:UTF-8:requestType=POST
not only store the first one
Cache Entry:
/webapp/wcs/stores/com.ibm.commerce.struts.ECActionServlet.class:pathinfo=/CategoryNavigationResultsView:storeId=10202:langId=-1:catalogId=10051:categoryId=10056:pageView=grid:beginIndex=0:pageSize=12:searchType=:sType=SimpleSearch:resultCatEntryType=:metaData=:orderBy=:orderByContent=:
facet=ads_f10501_ntk_cs%3A%22Blue%22:
filterFacet=:manufacturer=:minPrice=:maxPrice=:contentBeginIndex=0:isHistory=false:productBeginIndex=0:requesttype=ajax:objectId=:resultType=products:searchTerm=:UTF-8:requestType=POST
Special thanks to Kevin Ortega (IBM) to help me find out this.







