Introduced in Feature Pack 1

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

To set up this type of caching, you must add a 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

  1. Open the cachespec.xml cache configuration file in the following directory:
    • WebSphere Commerce DeveloperWCDE_installdir/workspace/Stores/WebContent/WEB-INF/
    • WebSphere Commerce EnterpriseWebSphere Commerce - ExpressWebSphere Commerce ProfessionalWC_eardir/Stores.war/WEB-INF/
  2. Find the <cache-entry> section for the e-Marketing Spot that displays the top browsed or best seller list.
  3. Above the </cache-entry> end tag, add the following line of code to define the dependency ID:
    <dependency-id>RankingEMarketingSpot</dependency-id>
  4. 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>
  5. Save and close the file.