Enabling the dynamic cache service and servlet caching

For local stores running in the Development environment, you can use the WebSphere Application Server (WAS) administrative console to enable the dynamic cache service and servlet caching. For local stores running in the server/runtime environment, create a custom image using Run Engine commands to enable dynamic cache service and servlet caching.

Notes:
  1. Data caching is enabled by default for remote stores. In the default Store server Docker container, you can find the cache parameters in the server.xml file configuration file. The parameters are defined in <distributedMap id="services/cache/cachename" memorySizeInEntries="cachesize"/> elements, where cachename is the name of the Store server cache, and cachesize is the number of entries to cache.
  2. For stores that run on the Store server, it might not be necessary to tune performance as the default settings might be sufficient. To tune the performance of the Store server, see the topic distributedMap - Distributed Map (distributedMap).

Procedure

  • Enable Dynamic Cache Service
    • WebSphere Application Server (WAS) administrative console
      1. Open WebSphere Application Server administrative console.
      2. Go to Servers > Server Types > WebSphere Application Server > server_name.
      3. In Container Settings, select Container Services > Dynamic Cache Service.
      4. Select the Enable service check box.
      5. Select Apply, and then save the configuration.
      6. Restart the application server.
    • Docker/containerized environments
      1. For containerized deployments, run enable-servlet-caching command to enable caching for the web container. For more information see Transaction server Run Engine commands
  • Configuring the baseCache to use a selected cache service provider (HCL Cache or Dynacache)
    1. Set Cache provider ../../developer/tasks/tsethclcacheprovider.html.
    2. To update the base cache size, see tdcupdatecachesize.html.
    3. JVM Properties
      1. Click Servers > Application Servers > your_Commerce_Application_Name > Java and Process Management > Process Definition > Java Virtual Machine > Custom Properties
      2. Define the following properties, if they are not already defined:
        Custom Property Name Value
        com.ibm.ws.cache.CacheConfig.filterLRUInvalidation true
        com.ibm.ws.cache.CacheConfig.filterTimeOutInvalidation true
        com.ibm.ws.cache.CacheConfig.filterInactivityInvalidation true
        com.ibm.ws.cache.CacheConfig.disableTemplateInvalidation true
        com.ibm.ws.cache.CacheConfig.ignoreValueInInvalidationEvent true
        com.ibm.ws.cache.CacheConfig.useServerClassLoader true
        com.ibm.ws.cache.CacheConfig.disableStoreCookies ALL
        com.ibm.ws.cache.CacheConfig.cascadeCachespecProperties true
        com.ibm.ws.CacheConfig.alwaysTriggerCommandInvalidations true
        com.ibm.ws.cache.CacheConfig.htodDependencyCacheIndexEnabled true
        • set-system-property command:

          Define or update Java Virtual Machine (JVM) system properties for cache configuration and tuning in HCL Commerce.

          The set-system-property run engine command manages JVM properties for the runtime environment. For more details, refer to Transaction server Run Engine commands.
      • WebSphere eXtreme Scale configuration:

        Configure the baseCache to use the WebSphere eXtreme Scale service provider. For more information, see Integrating HCL Commerce version 9 with WebSphere eXtreme Scale.

        To optimize cache invalidation behavior when using eXtreme Scale, add the following custom properties in your application server configuration:

        Custom Property Name Value
        com.ibm.ws.cache.CacheConfig.filterLRUInvalidation true
        com.ibm.ws.cache.CacheConfig.filterTimeOutInvalidation true
        com.ibm.ws.cache.CacheConfig.filterInactivityInvalidation true
        com.ibm.ws.cache.CacheConfig.disableTemplateInvalidation true
        com.ibm.ws.cache.CacheConfig.ignoreValueInInvalidationEvent true
        com.ibm.ws.cache.CacheConfig.useServerClassLoader true
        com.ibm.ws.cache.CacheConfig.disableStoreCookies ALL
        com.ibm.ws.cache.CacheConfig.cascadeCachespecProperties true
        com.ibm.ws.CacheConfig.alwaysTriggerCommandInvalidations true
        com.ibm.websphere.xs.dynacache.topology remote
        • set-system-property command:

          Define or update Java Virtual Machine (JVM) system properties for cache configuration and tuning in HCL Commerce.

          The set-system-property run engine command manages JVM properties for the runtime environment. For more details, refer to Transaction server Run Engine commands.