Enabling the HCL Commerce Cache Manager application in an HCL Commerce development environment

Configure the HCL Commerce Cache Manager application within your HCL Commerce development environment to aid in the control of your caching implementation.

Before you begin

Ensure that Redis is started. If your HCL Commerce development environment also includes a HCL Commerce Developer Search environment with the full Elasticsearch solution, then Redis is already installed. Otherwise, you can install and start it locally.
docker run --name redis -e ALLOW_EMPTY_PASSWORD=yes -p 6379:6379 bitnami/redis:latest

Procedure

  1. Optional: HCL Commerce Version 9.1.12.0 or later The Cache Manager can be deployed in an HCL Commerce development environment using the Docker Compose deployment method.
    Update the env.sh configuration file with:
    • DEPLOYMENT_TYPE=toolkit,
    • set CACHE_ENABLED=true,
    • and specify the CACHE_APP_IMAGE.

    For more information, see Deploying HCL Commerce Version 9.1.6.0 or greater with Docker Compose (for non-production usage).

  2. Update your HCL Commerce Developer environment configuration.
    1. Open the WCDE_installdir/setup/hcl-cache/redis/singleserver/redis_cfg.yaml Redis configuration file for editing.
    2. Update the Redis hostname and port number in the address field.
    3. Save and close the file.
  3. Start the Cache Manager container.
    docker run -d --name=cacheManager -e LICENSE=accept -p 40900-40901:40900-40901 -v WCDE_installdir/setup/hcl-cache/redis/singleserver/redis_cfg.yaml:/SETUP/hcl-cache/redis_cfg.yaml -v WCDE_installdir/setup/hcl-cache/cache-manager/cache_cfg-ext.yaml:/SETUP/hcl-cache/cache_cfg-ext.yaml cache-app:version
    For example:
    docker run -d --name=cacheManager -e LICENSE=accept -p 40900-40901:40900-40901 -v W:/WCDE_V9/setup/hcl-cache/redis/singleserver/redis_cfg.yaml:/SETUP/hcl-cache/redis_cfg.yaml -v W:/WCDE_V9/setup/hcl-cache/cache-manager/cache_cfg-ext.yaml:/SETUP/hcl-cache/cache_cfg-ext.yaml commerce/cache-app:9.1.11.0
    The Cache Manager application starts. Ensure that no errors are observed.

Results

The Cache Manager application is started in your local HCL Commerce development environment. You can now open the web console at https://localhost:40901/openapi/ui/#/, or call the /cache API. If there are other servers running, you can observe the list of caches with their size in the output.