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
-
Configure all the e-Marketing Spots associated with each page in the campaign caching file
eMarketingSpotInvocationList.xml
in the following directory:- workspace_dir\WC\xml\campaigns\cache\
- WC_eardir\xml\campaigns\cache\
-
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.
- Opening Configuration Manager.
- From the left navigation within Configuration Manager, expand WebSphere Commerce > hostname > Commerce > Instance List > instance name > Components > CampaignsCachingComponent.
- 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.
- Click Apply. A message displays to indicate that the system is successfully configured for this component.
- Close Configuration Manager.
-
Add a servlet cache entry to the
cachespec.xml
file similar to the example found in the samplecachespec.xml
file in the following directory:- WCDE_installdir\samples\dynacache\marketing\
- WC_installdir\samples\dynacache\marketing\
- 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.