Creating and scheduling the InvalidateSearchCache job

The InvalidateSearchCache job is used for generating cache invalidation events in the live environment, based on the search index related updates from the authoring environment.

Before you begin

  • The InvalidateSearchCache job was enabled in HCL Commerce Version 9.0.1.11. Ensure that you are on this fix pack version or greater.
  • To ensure that the InvalidateSearchCache job can be performed, the SRCHCONF table must be populated with the correct Search server host name and port. For more information, see Enabling the InvalidateSearchCache scheduled job (KB0077569).

About this task

It is recommended to configure this scheduler job to start on one of the live WC servers after stagingprop and indexprop have been performed. This scheduler command can be used to determine if cache invalidation entries are necessary to be generated based on the current state of the Repeater server. The command performs the check using the following mechanism.
  1. It queries the CACHEIVL database table to determine when the most recent search related invalidation operation was performed.
  2. Once the last invalidation time is determined, the command turns to the Repeater server and requests a list of IDs that have been updated since the last invalidation time.
  3. The command then takes this list of IDs (from both the Catalog Entry and Catalog Group indexes), and generates the corresponding cache invalidation tasks. The invalidation tasks are based on preconfigured cache invalidation templates in wc-component.xml file. For information on how to configure these templates, see Caching and invalidation in HCL Commerce Search.
  4. The invalidation tasks are inserted into the CACHEIVL table.
  5. When the DynaCacheInvalidation scheduler task starts up at the next scheduled time interval, the CACHEIVL entries will be processed, and invalidate their cache fragments.
  6. The data object cache on the subordinate Search servers in the live environment will be refreshed at the same time.

Procedure

  1. Open the Management Center Tools. HCL Commerce Version 9.1.3.0 or laterOpen Management Center Tools and from Hamburger menu, click System Administration > Scheduler.
  2. Click Scheduler. A list of jobs that are scheduled to run is displayed.
  3. Create the InvalidateSearchCache job.
    1. Select New.
    2. Create the InvalidateSearchCache job with the following values.
      Table 1.
      Parameter Value
      Job command InvalidateSearchCache
      Job parameters Leave this field empty as no job parameters are required.
      Start date Enter the current date.
      Start time Enter a time when you want to begin the first run of the job.
      Schedule interval Type the number of seconds between successive runs of this job. If this parameter is omitted, the job runs only one time. A typical schedule interval for this job is 600 seconds (ten minutes).

      If the job takes more than ten minutes to run, the next scheduled job is skipped. That is, only one instance of the indexing is run per master catalog.

      Job priority Enter 10 to indicate that the job is of high priority.
      Application type Enter Search as the type so that the job is completed under a separate work manager thread pool.

      For more information about the full set of parameters for scheduled jobs, see Scheduling a site-level job.

    3. Click Save to submit the job.

Results

Your job is listed on the Scheduler Status Display page and runs at the specified start time.