GoServe includes an optional performance optimization that may be useful for heavily loaded servers or for applications where response time is critical. You should only use this option if (a) you are already allowing access to all files in your GoServe data directory, as when using the sample filter, or (b) you have read and understood the remainder of this section.
If the file command cache is made active (by selecting the 'Active' checkbox in the 'File command cache' box on the 'General' page of the options notebook), then eligible FILE commands will be associated with the current HTTP or Gopher request. If the identical request line is received later, the FILE command will be executed immediately, without invoking the filter.
This caching avoids the overhead of calling the filter. For the sample filter, this is small (less than 15ms on a 486/50MHz PC), but with more complex filters this can be significant.
Eligible file commands are those which do not specify ERASE or NOCACHE (see below), and which are issued in response to an HTTP GET request or any Gopher request.
Note, however, that if the file command cache is used, there is no filtering of the request, and so the file will be sent unconditionally (that is, no security checking will take place, for example). Therefore, if file caching is to be used, FILE commands referring to sensitive files should be protected by specifying the NOCACHE option on the command. This prevents them being cached, and so requests for those files will always be processed by the filter.
The intent of the file command cache is to minimize the response time to the client and the load on the server by avoiding the call to the filter. You may, however, request that the filter still be called (after the cached FILE command has been executed) by selecting the 'Call filter anyway' radio button on the 'General' page. This may be useful when specialized logging is being carried out, for example. The filter can detect whether a cached FILE command has already been successfully executed by using the COMPLETED() function call.
[ previous section | GoServe | next section ]
From 'goserve.doc', version 2.32.
Copyright © International Business Machines Corporation, 1993, 1995.
All rights reserved.