Feature Pack 8: The Madisons store is deprecated. Most features demonstrated in the Madisons store are available in the Aurora store.

Dynamic caching in the Madisons mobile starter store

The Madisons mobile starter store enables dynamic cache by default, similar to other WebSphere Commerce starter stores. With Dynamic caching, the server load is reduced, as significant segments of the page do not have to be retrieved from the server on every new page display.

To ensure the dynamic cache service is enabled, see Enabling the dynamic cache service and servlet caching.

For configuration information, see Configuring the dynamic cache service.

Caching strategy in the Madisons mobile starter store

Cached full pages include the following views:
  • mIndex
  • mCategoriesDisplayView
  • mProductDisplayView
  • mContactUs
  • mPrivacyPolicy
Cached common pages include the following JSP files:
  • CachedHeaderDisplay
  • CachedFooterDisplay
  • Categories
  • BreadCrumbTrailDisplay

Madisons mobile starter store cachespec.xml file

You can view the cachespec.xml file that comes with the Madisons mobile starter store in the following directory:
  • For IBM i OS operating systemSolarisLinuxAIXWindowsWC_installdir/samples/dynacache/Madisons/mobile
  • WebSphere Commerce DeveloperWCDE_installdir/samples/dynacache/Madisons/mobile
Note: If you are using Extended Sites or have renamed the store directory to something other than Madisons, you need to edit the cachespec.xml file and replace all instances of Madisons with your new store directory name.

The default Madisons mobile starter store cachespec.xml file contains basic caching examples for the catalog browsing pages and static pages. It should be modified accordingly to meet your store's specific caching requirements, and the invalidation rules copied manually. It is recommended to cache responses that are common to all customers such as category browsing, and not those that can be different to customers such as shopping carts. See Adding sample invalidation policies to your store's cachespec.xml file for more information.

Separately caching shared views

The Madisons starter store contains shared views with the Madisons mobile starter store. You can generate different cache-ids for the shared views to separately cache the mobile version of the page from the non-mobile version of the same page.
  1. In the wc-server.xml file, add the following code to the /config/Components/component[name="DynaCacheFilterMappings"] section:
       display="false" dynacacheAttributeName="DC_deviceFormatId"
       methodName="setDeviceFormatId" name="setDeviceFormatId"/>
    Where the callback is used to generate the DC_deviceFormatId CacheFilter attribute.
  2. In the cachespec.xml file, add the following to all cache-id entries that are shared by the Madisons starter store and the Madisons mobile starter store:
    <component id="DC_deviceFormatId" type="attribute">