|
| Caching |
|
Caching of the VXML page is similar to the caching of a web page. The IVR (VXML browser) retrieves the VXML page and the voice
prompts from an application server which most probably is based remotely at the client or WASP's site. The VXML page
(which holds the voice application) is then held by the IVR, or cached, up until the moment the caching is cleared or flushed.
Caching is primarily used to save bandwidth, hence unnecessary retrieval of information is avoided.
Also, caching allows for application optimization, hence no
delays will be experience by callers while voice segments or VXML documents are retrieved.
The time interval at which the cache is cleared varies from system to system. In some instances it could be every 15 minute; in
some instances it might be once a month. However, what is important to the developer is that he or she must be able to refresh
their application any time they deem it necessary.
If a developer would not be able to refresh their application, and force the cache to update, it would be impossible to launch new
applications, as the old application will still be presented to callers due to the application being held in the cache.
You can use the <meta> element to force the refresh of a VoiceXML document by specifying a date in the past, or a set date on
which the application must refresh. The Meta tag compellation is as follow:
The context of the tag in the header of the VXML document is as follow:
Options to manage the caching of audio and VoiceXML leaf pages are as follow:
Attributes of the <audio> , <subdialog>, <goto> and other dialog control elements, as defined in VoiceXML, are:
- fetchtimeout
This is the interval to wait for the content to be returned before throwing an error.badfetch event. The value is a Time
Designation which can be milliseconds (ms) or seconds (s).
- fetchhint
Defines when the interpreter context should retrieve content from the server. prefetch indicates a file may be downloaded when
the page is loaded, whereas safe indicates a file that should only be downloaded when actually needed.
- maxage
Indicates that the document will reference content whose age is no greater than the specified time in seconds.
Stale content will not be used unless maxstale is also provided.
- maxstale
Indicates that the document will reference to use content that has exceeded its expiration time. If maxstale is assigned a value,
then the document will accept content that has exceeded its expiration time by no more than the specified number of seconds.
For example:
Subdialogs can also be used to reduce the initial size of a VXML documents. It also allows for the decomposing complex
sequences of dialogs to enhance structuring into reusable components. A subdialog is a like a function that is called
and returns a value. Subdialogs are very handy for bigger applications.
Now we can go to:
Subdialogs
|