HCL Commerce’s Integrated Cache Solution

Written by Nauman Sohail

Senior Business Analyst

HCL Commerce is designed to accommodate all significant ecommerce functionalities, including sales, customer, marketing, and order processing. HCL Commerce comes in a seamlessly integrated package, and its DynaCache functionalities help improve the performance and scalability of features such as remote caching, real-time monitoring, and auto-tuning.

So, what is DynaCache?

DynaCache

DynaCache is a sophisticated Java Hashtable. It is the code that is used to provide the in-memory cache services and extends the Java Dictionary class. DynaCache can be used to store objects and then, based on some data matching rules, retrieve those objects and serve them from its own cache. Caches are stored in the JVM heap memory, and DynaCache supports overflow to disk, if enabled and when required.

Traditionally, DynaCache removes stale cache items, both as individuals or dependent, related groups, and this process is known as invalidation. DynaCache creates a user-defined, unique "key" to store and retrieve cache items and a second, optional, shared group key for group invalidation. In addition, DynaCache provides an API for developers to call invalidation as a runtime function.

By adding remotely centralized caching with Redis, DynaCache capabilities are extended with additional operational and monitoring support.

Now, let’s talk about Remote Cache using Redis.

Redis

HCL Commerce supports remote caching with Redis in combination with traditional in-memory cache configurations. This technique enhances its performance and provides excellent results.

Redis is a well-known open-source, in-memory data store used as a database, cache, or message broker. It can be installed in standalone mode or Kubernetes. HCL Commerce experts can use multiple deployment options and configurations available for Redis. The HCL Cache uses an open-source Redis client, i.e., Redisson for Java, which supports all the popular topologies.

The remote cache feature offers multiple benefits, e.g., a remotely stored cache on Redis allows the storage of much larger caches (100s of GB or even more, if Redis is clustered). Moreover, with unlimited cache sizes, hit ratios are much higher.

Moreover, remote caching enables the reuse of caches. When a new container is brought online, it gets access to all existing caches. This significantly reduces the warm-up period and increases resilience to cache-clear operations. As each container no longer needs to create its cache, new servers can be added while minimizing the added load on shared resources, such as the database.

Remote caching improves performance by permitting the use of a large, in-memory cache and is not dependent on the size of the containers. This process assists in improving scalability by allowing the sharing of cached data across containers. In HCL Commerce, integration with the metrics framework is possible. And it will allow real-time monitoring as well as viewing caching activity alerts.

Monitoring

HCL Commerce is released with Prometheus monitoring and Grafana dashboards for monitoring purposes. HCL Commerce experts develop Grafana dashboards for internal cache tuning. These dashboards can be used as it is or customized according to the user’s choice for testing, monitoring, or alerts. The dashboards include details of remote operations such as cache sizes, the response time (average and percentiles), state of circuit breakers, operations by the cache, details on invalidations, and more. HCL Commerce provides dashboards for local caches, which include usage details by entries, operations, removals (e.g., expiry, LRU), and much more.

HCL Commerce provides all the metrics available, and as per choice, users can create dashboards in the tooling.

HCL Cache Manager

The Cache Manager (9.1.3+) pod permits users to integrate with the HCL Cache using REST. This is valuable for operations such as cache invalidates and clear and provides APIs for debugging and monitoring the cache.

In v9, the HCL Cache is enabled by default; it is required if the customer is using Elasticsearch. It is up to the customer to identify the need for Redis variant and then enable Prometheus for monitoring. The core objective is to utilize the advantage of the new cache to improve the performance of the customer’s site.

Royal Cyber is an HCL Commerce Solutions Partner and has a technical team with comprehensive knowledge and extensive experience that can offer you migration or upgrade support. You can also email us at info@royalcyber.com or visit www.royalcyber.com to get more details on our services and packages.