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 WAS 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, logon to your store as a WebSphere Commerce site administrator. Notes:
- Ensure that cache replication has been enabled. Refer to the Cache replication topic in the WebSphere Application Server Information Center for directions on how to enable it.
URL structure
- http:// host_name/path/
- The fully qualified name of your 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
- This parameter is any positive integer that represents the integral part of the timestamp in milliseconds.
- startNanos= nanoseconds
- This parameter is 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.
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_name/path/DynaCacheInvalidation?startTime=0&startNanos=0The following example clears all the cached pages in the dynamic cache:
http:// host_name/path/DynaCacheInvalidation?clear=true
Behavior
- 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 WAS 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.
Exception conditions
DynaCacheInvalidation throws an ECException if there are problems executing the SQL, or if there is a system error.
Related concepts
Cache invalidationRelated tasks
Tutorial: Invalidating cacheRelated reference
Caching defaults