[ engine overview | whitefrost.com | Stephen W. Cote ]
This example demonstrates pooling and caching in the xml utility package, which is a part of Engine. The caching feature is enabled for both browsers. When the XML file is acquired, a text representation of the DOM is written into the following textarea.
Click the Next Document button to fetch an XML document. After fetching one or more documents, try clicking the Prev Document. Note that a cached copy is returned instead of making another request to the server for the same resource. Now, click Clear Cached and try clicking Next Document or Prev Document where you would expect to retrieve a cached copy. Notice a request to the server is made again, and the resulting DOM Document is once more cached.
When a document is retrieved from the server, one connection from the pool will be consumed. The connection is automatically returned after invoking the specified handler. Though request object is returned to the pool, the cached DOM document or any reference the handler may keep should be unaffacted.
Pooling Enabled: Caching Enabled: Async Request: