Upgrading HCL Commerce introduces modifications to the default
configurations within the wc-server.xml file. Review these parameter
adjustments to optimize runtime performance, caching behaviors, and request
handling.
9.1.20.0 release changes
HttpResponseHeaderConfiguration update
- In HCL Commerce runtime, a new
HttpResponseHeaderConfiguration block is added to the
wc-server.xml file to support Cache-Control and Pragma
HTTP header configuration for REST responses.This configuration block is
disabled by default. To use this functionality, you must explicitly set
enable="true" in the configuration.
- Configuration update: You can configure the
HttpResponseHeaderConfiguration component in
wc-server.xml to manage REST response headers. Use the
following XML snippet to update your
configuration.<component
compClassName="com.ibm.commerce.foundation.rest.util.HttpResponseHeaderConfigurationHelper"
enable="false"
name="HttpResponseHeaderConfiguration">
<property>
<RestTemplateToHttpHeaderMapping>
<SetHeaderIfEmpty name="Cache-Control" value="no-store, no-cache, s-maxage=0, max-age=0, must-revalidate"/>
<SetHeaderIfEmpty name="Pragma" value="no-cache"/>
</RestTemplateToHttpHeaderMapping>
<RestTemplateToHttpHeaderMapping
httpMethods="GET"
responseCodes="200"
restTemplates="store/{storeId}/contract">
<SetCacheControlDirective name="private"/>
<SetCacheControlDirective name="max-age" value="600"/>
</RestTemplateToHttpHeaderMapping>
<RestTemplateToHttpHeaderMapping
httpMethods="GET"
responseCodes="200"
restTemplates="
store/{storeId}/adminLookup
store/{storeId}/associated_promotion
store/{storeId}/configuration
store/{storeId}/country/country_state_list
store/{storeId}/currency_format
store/{storeId}/espot/{name}
store/{storeId}/espot/{name}/type/{type}
store/{storeId}/features
store/{storeId}/marketplace-sellers
store/{storeId}/online_store
store/{storeId}/page
store/{storeId}/page_design
store/{storeId}/seo/token
store/{storeId}/seo/urlkeyword
store/{storeId}/seo/urls
">
<SetCacheControlDirective name="max-age" value="0"/>
<SetCacheControlDirective name="s-maxage" value="600"/>
</RestTemplateToHttpHeaderMapping>
</property>
</component>
- Related Information
-