Create 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.
Task info
IBM recommends 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.
- It queries the CACHEIVL database table to determine when the most recent search related invalidation operation was performed.
- 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.
- 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 WebSphere Commerce Search.
- The invalidation tasks are inserted into the CACHEIVL table.
- When the DynaCacheInvalidation scheduler task starts up at the next scheduled time interval, the CACHEIVL entries will be processed, and invalidate their cache fragments.
- The data object cache on the subordinate Search servers in the live environment will be refreshed at the same time.
Procedure
- Open the Administration Console and select Site on the Administration Console Site > Store Selection page.
- Select Configuration > Scheduler. A list of jobs that are scheduled to be run is displayed.
- Create the InvalidateSearchCache job.
- Select New.
- 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 we 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.
- Click OK to submit the job.
Results
Your job is listed on the Scheduler Status Display page and runs at the specified start time.
Related tasks
Scheduling a site-level job
Activating the web cache monitor