Setting cache providers in HCL Commerce

Starting with HCL Commerce Version 9.1, all caches are automatically configured to use the HCL Cache. However, the cache provider for each cache can be set to use the DynaCache provider, or the WebSphere Extreme Scale DynaCache provider.

To set the cache provider for caches, follow the steps outlined below depending on the server type.
Important: The Elasticsearch-based search solution requires the use of HCL Cache with Redis. This is due to the fact that the NiFi service listens for cache updates and cache invalidations, and does not have a supporting system in place, such as Kafka.

WebSphere Application Server V8.5.5 Liberty (Store, Search, and Customization servers)

In WebSphere Application Server V8.5.5 Liberty, the cache provider for each cache is configured with the cacheProviderName attribute of the distributedMap element:

<distributedMap id="baseCache" cacheProviderName="hcl-cache" memorySizeInEntries="1500"/> 

If the cacheProviderName attribute is not specified, the cache uses the DynaCache provider.

To override a cache provider for WebSphere Application Server V8.5.5 Liberty:
  1. Create a file within the WebSphere Application Server V8.5.5 Liberty /configDropins/overrides/ directory.

    For example: /opt/WebSphere/Liberty/usr/servers/default/configDropins/overrides/cache.xml

  2. Within the file, list the new configuration for caches.
    For example:
        <distributedMap id="baseCache" memorySizeInEntries="1000" cacheProviderName="default"/>
  3. Restart the server.
    The server will display a message similar to the following, confirming the overriding changes to your cache configuration.
    [10/15/20 14:16:41:387 GMT] 00000026 ConfigValidat A   CWWKG0102I: Found conflicting settings for baseCache instance of distributedMap configuration.
      Property cacheProviderName has conflicting values:
        Value hcl-cache is set in file:/opt/WebSphere/Liberty/usr/servers/default/server.xml.
        Value default is set in file:/opt/WebSphere/Liberty/usr/servers/default/configDropins/overrides/cache.xml.
      Property cacheProviderName will be set to default.
    In addition, it will display messages similar to the following, confirming the cache provider that is used.
    [10/15/20 14:16:44:201 GMT] 0000001d ServerCache   I   DYNA1001I: WebSphere Dynamic Cache instance named baseCache initialized successfully.
    [10/15/20 14:16:44:204 GMT] 0000001d ServerCache   I   DYNA1071I: The cache provider default is being used.

WebSphere Application Server (Transaction server)

Use the set-cache-provider run engine command to reconfigure the cache provider of an existing cache. For more information on the set-cache-provider run engine command, see Transaction server Run Engine commands.