Enabling JSP snippet caching

You can avoid running the e-Marketing Spot snippet for each page load by enabling JSP snippet caching.

Note: It is recommended that you use the new e-Marketing Spot JSP caching technique based on activity behavior. For more information, see Overview of e-Marketing Spot JSP caching based on activity behavior.

Procedure

  1. Configure all the e-Marketing Spots associated with each page in the campaign caching file eMarketingSpotInvocationList.xml in the following directory:
    • WebSphere Commerce Developerworkspace_dir\WC\xml\campaigns\cache\
    • WC_eardir\xml\campaigns\cache\
  2. Enable CampaignsCachingComponent by:
    Note: To enable JSP snippet caching by CampaignsCachingComponent applies to Marketing in Accelerator. If you handle the marketing of your site through Management Center, this procedure is not applicable.
    1. Opening Configuration Manager.
    2. From the left navigation within Configuration Manager, expand WebSphere Commerce > hostname > Commerce > Instance List > instance name > Components > CampaignsCachingComponent.
    3. From the right window within Configuration Manager, the component name and class names are prefilled with applicable business auditing information. Select Enable Component to enable CampaignsCachingComponent.
    4. Click Apply. A message displays to indicate that the system is successfully configured for this component.
    5. Close Configuration Manager.
  3. Add a servlet cache entry to the cachespec.xml file similar to the example found in the sample cachespec.xml file in the following directory:
    • WebSphere Commerce DeveloperWCDE_installdir\samples\dynacache\marketing\
    • WC_installdir\samples\dynacache\marketing\
  4. Optional: If you are using a staging server, or are updating data through a utility such as massload, clear the cache when data is pushed into production. Clearing the marketing JSP snippet cache can be done with the Administration Console or a scheduled job.