class Standard . HTTPcachedObject {
string EtagString;
oid accessValidator;
int32 contentLength;
string contentType;
int32 createTime;
any data;
set dependentObjs;
assoc fileInfo;
string headerData;
int32 localExpireTime;
assoc modTime;
set names;
int32 resultCode;
string resultResponse;
oid sleepingThread;
set specialHeaders;
oid urlDirectory;
} inherits from Object;
The HTTPcachedObject class is the base class for objects that hold cached documents, which have been requested via the URLdirectory. It is never used directly, only as the base class of a derived class that implements relevant functionality.
HTTPcachedObject:deleteIfObsolete(int32 currentTime, int32 checkInterval)
The deleteIfObsolete method instructs the cached object to delete itself if it will expire within the interval specified by currentTime plus checkInterval.
HTTPcachedObject:checkIfStillValid(optional int32 currentTime)
The checkIfStillValid method is used to determine if a cached object's contents are still valid. For documents that utilize server-side-includes, this involves additionally verifying that the included contents have not been altered.
HTTPcachedObject:setAccessValidator(oid obj)
The setAccessValidator method is used to protect access to a cached document. The single argument to this method specifies a URLprotectedFile or equivalent object that maintains the relevant password database that controls access to this object.
HTTPcachedObject:validateAccess(any authData, string HTTPcommand, any opaqueCheckValue)
Given HTTP authentication data, the validateAccess method returns information indicating if access is permitted or not. See the URLprotectedFile:validateAccess for details.
HTTPcachedObject:noteReplaced(string name)
When a newly cached object registers itself using a name already in use, the pre-existing cached object is sent a noteReplaced message. For a HTTPcachedObject, the indicated path name is removed from the list of aliases for the object. If there are no more aliases defined, then the object is deleted.
HTTPcachedObject:createFromFile(oid urlDir, array uriInfo, assoc cgiEnv, assoc fileData, string impliedName, string fullName)
The createFromFile method is the most common means by which an HTTPcachedObject subclass retrieves data from the local filesytem. No further processing, such as server-side-includes, is done by this method.
HTTPcachedObject:createAfterSubstitutions(oid urlDir, string pageData, string mimeType, assoc substitutions, string name)
The createAfterSubstitutions method is used to initialize a HTTPcachedObject -derived object from a string that holds the contents of a file.
This method name should be changed as it no longer performs SSI-related work.
HTTPcachedObject:getContentType()
Returns the MIME type of the cached content.
HTTPcachedObject:setContentType(string newContentType)
Sets the MIME type of the cached content.
HTTPcachedObject:getFileData()
Returns the cached content.
HTTPcachedObject:setFileData(any d, optional int32 timeout, optional set dependObjs)
The contents of an existing HTTPcachedObject can be replaced using setFileData. If the MIME type is different than the current contents of the object, the method setContentType should be called first.
HTTPcachedObject:setExpireTime(int32 secondsInFuture)
The setExpireTime method overrides default expiration time by setting a new time. If secondsInFuture is equal to -1, the cached object's expiration time is removed and effectively made permanent; otherwise the expiration time is set to the current time plus the indicated number of seconds in the future.
The new expiration time is returned.
HTTPcachedObject:getRequest(array requestData, assoc options, string replyMethod, oid replyDest)
The getRequest follows the prototype for all requests generated by the HTTPfastReceive.
The following header options are supported:
HTTPcachedObject:headRequest(array requestData, assoc options, string replyMethod, oid replyDest)
See getRequest. No entity body will be returned in a HEAD request; the remaining of the behavior is identical to a GET request.
HTTPcachedObject:postRequest(array requestData, assoc options, string replyMethod, oid replyDest)
Prototype for HTTP POST requests. Returns a 405 (Method Not Allowed) error by sending a returnError message.
HTTPcachedObject:putRequest(array requestData, assoc options, string replyMethod, oid replyDest)
Replaces an entity. If the entire data has not already been read from the stream, a SendFile object is created to read the remainder, thus eliminating the requirement to have the entire entity be placed into memory before transfer to the local filesystem. This enables the storage of documents that are too large to fit into memory.
HTTPcachedObject:deleteRequest(array requestData, assoc options, string replyMethod, oid replyDest)
Unlinks a file from the local filesystem and removes the cache object.
HTTPcachedObject:optionsRequest(array requestData, assoc options, string replyMethod, oid replyDest)
Handles options requests.
HTTPcachedObject:extensionRequest(array requestData, assoc options, string replyMethod, oid replyDest)
Handles non-standard HTTP commands, such as WebDAV's MKCOL.