Next: Active Cache Interface
Up: Active Cache: Caching Dynamic
Previous: Introduction
In Active Cache, the Web server specifies the association between a cache applet
and a URL-named document by sending a new entity header, ``CacheApplet,'' with
the document:
- CacheApplet: code = ``code.class'', archive = ``code.jar'', codebase = ``codebase_url''
The header follows the convention for applet specification in HTML
documents. It specifies that the applet ``code.class'' at
code base "codebase_url" is the cache applet for the document, and associated
classes are grouped in an archive (4, 4). Codebase and archive
directives are optional.
Since HTTP/1.1 allows the introduction of new entity headers, and requires that
if a proxy does not recognize an entity header, it should forward the
header, the server can be assured that Active-Cache enabled proxies will
receive the header even if they have parent proxies.
For security concerns, we require that the codebase of the applet, if present,
has the same server URL as the document. That is, only the Web server who
provides the document can supply the applet for it.
An Active-Cache enabled proxy agrees to fulfill the following obligations:
- if the document is cached and a user request hits on the document, it
will either invoke the cache applet, or send the request directly
to the server.
- if the applet's execution fails due to any reason, the request is sent to
the server;
- if the applet's execution succeeds, the proxy will take the appropriate
action based on the return value of the FromCache method (see below);
- each applet can deposit information in a special log object (whose name
is the name of the applet appended by ``.log''), and the proxy
will send the log object back to
the server periodically. If the proxy evicts the log object from
the cache, it will first send the object to the server.
In other words, the proxy will not return a cached reply to the user unless
the cache applet has been executed successfully, and the applet can deposit
information in the log object which will eventually be reflected back to
the server.
However, the proxy decides whether it wants to cache the document, when it
fetches the applet and the archive, and whether it wants to invoke the
applet. Furthermore, the proxy can evict any
document or any applet from its cache at any time. The only constraint on
the proxy is the above agreement.
The proxy's freedom means that the cache applet may not process every
request to the document, and some requests might instead go to the original
server. The applet does not capture every request to the document, but
captures every ``cache hit'' to the document.
Next: Active Cache Interface
Up: Active Cache: Caching Dynamic
Previous: Introduction
Pei Cao
7/22/1998