Document fetching and caching

How to use CCXML to fetch and cache documents and also control cache contents.

The Blueworx Voice Response V6.1 implementation of CCXML supports the CCXML attributes that hold cache control information:

maxage
A time interval in seconds, which if specified, indicates that the document can use content no older than the specified time interval.
maxstale
A time interval in seconds, which if specified, indicates that the document can use content older by the specified amount of time than the expiration time (specified in maxage).

The following CCXML elements have attributes that hold cache control information:

If the CCXML attributes are not used to specify the caching policy for a CCXML document, information in HTTP-header or in a<meta> element is used.

When a CCXML document is fetched by using the <fetch> element, the document is stored in a local cache and a cache timeout for the document is set. If expiration information is available in the document, for example if the document is retrieved from an http server or from a <meta> element, this information is used to set the cache timeout. Otherwise, a cache timeout of 24 hours is used. Other http header information can indicate that the document must not be stored in a local cache, in which case any expiration information is ignored and the document is not saved in the local cache. For example, documents that are fetched using the method="'post'" attribute value are never placed in the local cache.

The following http header fields are supported, either directly using http or indirectly using the http-equiv attribute of the <meta> element.
Header Name
Field
Date
HTTP-date
Last-Modified
HTTP-date
Expires
HTTP-date
Cache-Control
"no-cache"
Cache-Control
"max-age="
If a header field is specified both using http and a <meta> element, the header field specified using http takes precedence.

If a <fetch> request is made for a document with an identical URI to that of a document in the local cache, and the cache timeout has not expired, the document in the local cache is retrieved.

A document in the local cache remains valid until the timeout expires. If the timeout expires, when that document is next requested, it will be fetched from the original source.

While a document is active and being interpreted, it is not automatically updated if the original source is changed, even if the timeout expires. To update a cached document that has expired, another explicit <fetch> request is necessary, followed by a <goto> to launch it from the cache.

Viewing or expiring CCXML cache contents

You can use the dtjcache command to display or expire contents of the Blueworx Voice Response CCXML cache. You can select one or all documents in the cache to expire. New versions of any expired contents will be fetched when next retrieved. Content in the process of being loaded cannot be expired until fully loaded. See dtjcache script for details.