Although Http/Cache is a SplitObject, all of its methods are in OTcl. Most of them are used to process an incoming request. Their relations can be illustrated with the flowchart below, followed by explainations:
get-request client type pageid &
The entry point of processing any request. It checks if the requested
page $pageid exists in the cache's page pool, then call either
cache-hit or cache-miss.
cache-miss client type pageid &
This cache doesn't have the page. Send a request to server (or parent
cache) to refetch the page if it hasn't already done so. Register
$client in a list so that when the cache gets the page, it'll forward
the page to all clients who have requested the page.
cache-hit client type pageid &
Checks the validatity of the cached page. If it's valid, send $client
the cached page, otherwise refetch the page.
is-consistent client type pageid &
Returns 1 if $pageid is valid. This is intended to be overridden by
refetch client type pageid &
Refetch an invalid page from server. This is intended to be overridden
Tom Henderson 2011-11-05