Custom HCL Cache configuration
Caches are configured using two files. The cache_cfg.yaml configuration file contains default configurations, and specific values for default caches. The custom cache_cfg-ext.yaml file can be used to update defaults or set new configurations for custom caches. The cache_cfg-ext.yaml file is contained in the configuration maps in Kubernetes.
For more information about the caching defaults stored in Kubernetes, see the sample Configuration.md file stored in the HCL Commerce Github repository.
Modify or extend the function of the HCL Cache by making changes to this file. Required or other default settings which are not present in this file will fall back to their values that are found in the default configuration file.
- Cache_cfg-ext.yaml file changes:
# cache_cfg-ext.yaml content read from values redis: enabled: true yamlConfig: "/SETUP/hcl-cache/redis_cfg.yaml" # Please leave this line untouched cacheConfigs: services/cache/WCSessionDistributedMapCache: localCache: enabled: true
- configMaps values:
apiVersion: v1 # content for cache_cfg-ext.yaml cache_cfg_ext: |- redis: enabled: true yamlConfig: "/SETUP/hcl-cache/redis_cfg.yaml" # Please leave this line untouched # Cache configurations cacheConfigs: # Default configuration enables local and remote caching # See defaultCacheConfig in /SETUP/hcl-cache/cache_cfg.yaml for the out-of-the-box # default configuration. # The following custom configurations extend and override the definitions in the # /SETUP/hcl-cache/cache_cfg.yaml file. services/cache/SampleCustomLocalOnlyCache: remoteCache: enabled: false services/cache/SampleCustomRemoteOnlyCache: localCache: enabled: false # content for redis_cfg.yaml redis_cfg: |- singleServerConfig: idleConnectionTimeout: 10000 connectTimeout: 3000 timeout: 1000 retryAttempts: 3 retryInterval: 500 subscriptionsPerConnection: 5 sslEnableEndpointIdentification: true sslProvider: "JDK" pingConnectionInterval: 30000 keepAlive: true tcpNoDelay: true address: "redis://hcl-commerce-redis-master.redis.svc.cluster.local.:6379" subscriptionConnectionMinimumIdleSize: 1 subscriptionConnectionPoolSize: 50 connectionMinimumIdleSize: 24 connectionPoolSize: 64 database: 0 dnsMonitoringInterval: 5000 password: "${JNDI/ENCRYPTED:REDIS_PASSWORD_ENCRYPT:-}" threads: 16 nettyThreads: 32 referenceEnabled: true transportMode: "NIO" lockWatchdogTimeout: 30000 keepPubSubOrder: true useScriptCache: false minCleanUpDelay: 5 maxCleanUpDelay: 1800 addressResolverGroupFactory: !<org.redisson.connection.DnsAddressResolverGroupFactory> {}