Invalidating HCL Commerce data cache entries

When data in the database is created, updated, or deleted, using HCL Commerce tools, the cache is kept automatically up to date. Data that is updated with methods such as loading of catalog or price data might have to be invalidated with other methods of cache invalidation.


HCL Commerce provides additional methods of performing cache invalidation:
  1. Use Java programming to call the methods of the Java class. These methods accept the database table name, and optionally the column names and values in a row that was created, updated, or deleted, and perform the appropriate cache invalidations. WCDataCache works when running within the HCL Commerce environment and does not work when running in a stand-alone Java utility.
  2. Define and use the database triggers defined in the wcs.cacheivl.trigger.sql script. These database triggers cause specially formulated invalidation IDs to be appended to the CACHEIVL database table, in the DATAID column. The DynaCacheInvalidationCmd scheduler job processes the CACHEIVL rows and issues appropriate cache invalidations. When this technique is used, there is a time between when the database changes are made and when the DynaCacheInvalidation scheduler job performs the invalidations. During that time period, the old stale cached data is used.
  3. For stores on the Store server, you can also use extra cache invalidation by leveraging a third-party messaging system to send out cache invalidation request and trigger invalidation of data cache object on the Store server. Apache Kafka is the supported messaging middleware.