Technote (FAQ)
Question
The Madisons mobile starter store has some shared views with Madisons starter store.
For these shared views, how can different cache-ids be generated to cache the mobile version of the page separate from the non-mobile version of the same page?
Answer
1) In the wc-server.xml file, add the following code to /config/Components/component[name="DynaCacheFilterMappings"]:
<map
className="com.ibm.commerce.dynacache.filter.DeviceFormatIdCallBack"
display="false" dynacacheAttributeName="DC_deviceFormatId"
methodName="setDeviceFormatId" name="setDeviceFormatId"/>
This callback is used to generate the CacheFilter attribute "DC_deviceFormatId"
2) In the cachespec.xml file, add the following to all cache-id entries that are shared by the base store and the mobile store:
<component id="DC_deviceFormatId" type="attribute">
<required>true</required>
</component>
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.