Reference > System URLs > Cache
DynaCacheInvalidation URL
This is a scheduled command that can be invoked on a URL.
This is a scheduled command that can be invoked on a URL. It invalidates entries in the WebSphere Application Server dynamic cache, where the cached page's dependency ID, cache ID, or template is read from the CACHEIVL table. The default cache invalidation interval is 10 minutes. You can change this default in the WebSphere Commerce Administration Console. In addition, this command can be invoked as a URL given the startTime and startNanos parameters together or given the clear parameter alone.
To execute this command on the URL, you need to logon to the store as a WebSphere Commerce site administrator. Ensure that cache replication has been enabled.
URL structure
- http:// host_name/path/
- The fully qualified name of the WebSphere Commerce Server and the configuration path.
Parameter values
- startTime|startNanos
- The startTime and startNanos parameters are used to query the latest unprocessed rows in the CACHEIVL table. These parameters are used to construct a unique timestamp object using a milliseconds time value that can be used for the query. The timestamp value is the time that has elapsed since January 1, 1970, 00:00:00 GMT in milliseconds. When the DynaCacheInvalidation scheduled command first runs, startTime and startNanos are set to 0 (zero).
- startTime=milliseconds
- Any positive integer that represents the integral part of the timestamp in milliseconds.
- startNanos=nanoseconds
- Any positive integer that represents the fractional part of the timestamp in nanoseconds.
- clear=true
- The value of this parameter is always set to "true". The command will invoke the corresponding API to clear all the contents in the dynamic cache. Any other values are ignored.
- maxIndividualInvalidationsPerTable
- Specify a positive number, the default is 100000. This parameter sets a limit on the number of individual invalidations to be processed in a table before simply invalidating all Commerce Data Cache entries that have any dependency on data from that particular table. While removing more data than is strictly necessary, maxIndividualInvalidationsPerTable helps DynaCacheInvalidation complete more quickly when many rows have been written to the CACHEIVL table.
Note: Normally you specify either the startTime and startNanos parameters together, or the clear parameter by itself. If you specify all three parameters, the command takes the clear parameter.
Example
The following example invalidates the cached pages in the CACHEIVL table for all rows beginning from the first row:
http://host/path/DynaCacheInvalidation?startTime=0&startNanos=0
The following example clears all the cached pages in the dynamic cache:
http://host/path/DynaCacheInvalidation?clear=true
The following example invalidates all cache entries that have any dependency on data from a particular table:
http://host/path/DynaCacheInvalidation?maxIndividualInvalidationsPerTable=100000
Behavior
- The command reads rows from the CACHEIVL table in the WebSphere Commerce database. Only those rows against whom the invalidation has not been processed before are fetched. The rows are selected by filtering (on their timestamp field values in the CACHEIVL table) against the timestamp of the previous invocation of the command.
- Determines whether the values specified in the CACHEIVL entries are present in the dynamic cache.
- If the cached pages represented by the CACHEIVL entries are present in the dynamic cache, the command invalidates them. If the cached pages represented by the CACHEIVL entries are absent in dynamic cache, the command takes no action.
- If the WebSphere Application Server dynamic cache is disabled, the command takes no action.
- If the command is executed on the URL with the clear=true parameter and value, the command directly calls the invalidation API to clear all the cache content.
Additional behavior information
- The startTime|startNanos name value pair is converted to a real time and any row in the CACHEIVL table that has an INSERTTIME after the converted startTime/startNanos is executed.
- To run the DynaCacheInvalidation job immediately complete one of the following tasks:
- In the Administration Console, set the time for the DynaCacheInvalidation job to an earlier time than the current time.
- Update the SCHACTIVE table. Refer to Troubleshoot: Settings for DynaCacheInvalidation URL.
Exception conditions
DynaCacheInvalidation throws an ECException if there are problems executing the SQL, or if there is a system error.
Related concepts
Related reference
Related information