Dynamic caching in the Aurora starter store
In the Aurora starter store, dynamic caching is enabled by default. Dynamic caching reduces the server load because significant segments of the page, such as store widgets, do not have to be retrieved from the server on every new page display.
To ensure that the dynamic cache service is enabled, see Enabling the dynamic cache service and servlet caching.
For configuration information, see Configuring the dynamic cache service.
Full page caching
Full page caching is used in the TopCategoryDisplay, CategoryDisplay, and ProductDisplay pages. Cache the AJAX response view for each of the refresh areas, if possible. Cache responses that are common to all customers, such as category browsing. Do not cache responses that can be different from one customer to the next, such as shopping carts.
Aurora starter store cachespec.xml file
- WC_installdir/components/samples/dynacache/Aurora
- WCDE_installdir/components/samples/dynacache/Aurora
The default Aurora starter store cachespec.xml file contains basic caching examples for the catalog browsing pages and static pages. Modify it to meet your specific caching requirements. Manually copy the invalidation rules. For more information, see Adding sample invalidation policies to cachespec.xml file.
Samples for setting up caching for WebSphere Commerce search
When the WebSphere Commerce Search index is built or updated, dependency IDs must be published to invalidate catalog entry and category pages in the JSP cache. You must add the dependency IDs to the wc-component.xml file for the catalog component. If you are using the sample cachespec.xml file that is provided with Aurora starter store, you can use the following example configuration properties to add the dependency IDs to the wc-component.xml file:
<_config:property name="CacheInvalidationForCatalogEntry"
value="" />
<_config:property name="CacheInvalidationForCatalogGroup"
value="" />
To:<_config:property name="CacheInvalidationForCatalogEntry"
value="ProductDisplay:productId:$catEntryId$,productId:$catEntryId$" />
<_config:property name="CacheInvalidationForCatalogGroup"
value="categoryId:$catGroupId$" />
For detailed instructions on changing properties in a custom wc-component.xml file, see Changing properties in the component configuration file (wc-component.xml) (WC EAR). If it does not matter that your updates will be overwritten with future software updates, you can update the wc-component.xml file directly at this path:
WCDE_installdir\workspace\WC\xml\config\com.ibm.commerce.catalog-fep\wc-component.xml
When you modify the URLs for product and category pages, the configuration parameter values might be different from the examples.
Separately caching multiple stores published from the Aurora.sar store archive
- B2C stand-alone store or storefront asset store
- B2B direct stand-alone store or storefront asset store
However, if you publish multiple stores in the same environment, all stores share cachespec.xml file. If you want to cache each store separately, you must duplicate the store-specific cache entries in the cachespec.xml file so that there is an entry for each store that you published. To modify the cachespec.xml file, complete these steps:
- Open your cachespec.xml file in an editor.
- Search for the first cache entry that contains the store name, for example, /Aurora/.
- Copy the line of code and paste it underneath the line that you copied.
- In the copied line, replace the store name with the name of the additional store that you published. For example, replace /Aurora/ with /AuroraB2B/.
- Repeat these steps for each additional cache entry that contains the store name.
- Save and close the file.
- Restart the server.