HCL Commerce Version 9.1.10.0 or later

HCL Cache configurations

The HCL Cache provides a set of configuration files in YAML format. The configuration can be updated for tuning purposes, or to provide custom caches with non-default configurations. See Configurations in Helm for details on how the configuration is updated.

File Location Usage
/SETUP/hcl-cache/cache_cfg.yaml Container Created by default and present on all containers that use HCL Cache. It contains default and default configurations and must not be modified.
/SETUP/hcl-cache/cache_cfg-ext.yaml Config Map Extends and overwrites the configuration in cache_cfg.yaml. This file maintains the same format as cache_cfg.yaml.
Note: cache_cfg.yaml must not be modified. All customizations must be done using cache_cfg-ext.yaml and the steps documented in Configurations in Helm.

Configuration merging process

During initialization, each container performs a merging process using the default configuration file /SETUP/hcl-cache/cache_cfg.yaml, and the extensions file /SETUP/hcl-cache/cache_cfg-ext.yaml which is created from the Kubernetes' configuration map. The extensions file can be used to configure custom caches with non-default values, or to change default configurations.

Note: When overwriting list elements, such as for maintenance configurations, you must overwrite the complete list.
Default cache configurations - defaultCacheConfig
The defaultCacheConfig element defines default configurations. Custom and preset caches that are not explicitly defined in the YAML configurations take their configuration from defaultCacheConfig. If a cache is defined in the configuration file, configuration elements that are not explicitly specified use defaults from defaultCacheConfig. The defaultCacheConfig element can be overwritten using the cache_cfg-ext.yaml extension file. While defaultCacheConfig makes it easier to implement changes that apply to all caches, cache specific changes should be done at the cache level.
Example: Custom remote only cache
The default configuration enables local and remote caching. A custom remote-only cache can be defined by adding the cache under the cacheConfigs element, and setting enabled: false for the localCache element as follows:
cacheConfigs:
  ...
  services/cache/MyCustomCache:
    remoteCache:
      enabled: true  
    localCache:
      enabled: false