Setting up JSP snippet caching for best seller and top browsed lists
If you have a Web activity that uses either the Display Top Browsed action or Display Best Sellers action, you can improve performance with caching. The marketing services update best seller and top browsed lists only once a day. Take advantage of JSP caching so that the list displayed on the storefront is refreshed only once a day, after the list is updated.
About this task
RankingEMarketingSpot
dependency ID to the cache configuration file. The dependency ID will be issued when the marketing
services call the com.ibm.commerce.marketing.commands.ranking.InvalidateRankingServletCmdImpl command. This
invalidate command is called once a day, after the lists have been updated. As a result, the list
displayed on the store page will be refreshed. Procedure
-
Open the
cachespec.xml
cache configuration file in the following directory:- WCDE_installdir/workspace/Stores/WebContent/WEB-INF/
- WC_eardir/Stores.war/WEB-INF/
-
Find the
<cache-entry>
section for the e-Marketing Spot that displays the top browsed or best seller list. -
Above the
</cache-entry>
end tag, add the following line of code to define the dependency ID:<dependency-id>RankingEMarketingSpot</dependency-id>
-
Add the following additional
</cache-entry>
below the previous entry:<cache-entry> <class>command</class> <name>com.ibm.commerce.marketing.commands.ranking.InvalidateRankingServletCmdImpl</name> <invalidation>RankingEMarketingSpot</invalidation> </cache-entry>
- Save and close the file.