Ford & Mason Ltd
HOME
ABOUT
CONTACT
RESOURCES
ADVERTISING



donations support the development of
cronolog.org
and
refcards.com

next up previous contents index
Next: Command line arguments Up: CERN and NCSA Previous: Server side includes


Proxy and caching (CERN only)

The functioning of proxy and caching servers is discussed in Section gif. This section deals only with the configuration directives relating to them.


Caching { On  | Off }                                  (Off)

Enables caching of files.


CacheNoConnect { On  | Off }                           (Off)

Turning this directive on disables the server from retrieving files from remote servers. Only files found on the local server will be returned.


CacheExpiryCheck { On  | Off }                          (On)

By default files are not returned from the cache if they have expired. Sometimes it is useful to return documents even if they have expired, for example if giving a demonstration.


Gc { On  | Off }       (enabled whenever caching is enabled)

Controls whether garbage collection is performed.


CacheRoot directory                             (no default)

Absolute pathname of the directory at the top of the cache hierarchy. Subdirectories will be created within this directory for each protocol cached, with further subdirectories within each of those directories to cache the information for each remote server.

    CacheRoot /usr/local/WWW-cache


CacheSize size                                         (5MB)

The maximum amount of disk space to be used for the cache (the cache may actually grow slightly larger than this on occasion).

    CacheSize 150 M


MaxContentLengthBuffer size                   (50 kilobytes)

When the server is acting as a proxy and retrieves a document that does not have a Content-length header from a remote server, it buffers the document in order to determine its size. This directive specifies the size of the buffer used. If the document is longer than this value it will be sent to the client without a Content-length header.

    MaxContentLengthBuffer 1 M


NoCaching template

A template for URLs that should not be cached. This directive can occur a number of times in the configuration file.

    NoCaching http://localhost/*


CacheOnly template

Only URLs that match the specified template should be cached. This directive can occur a number of times in the configuration file.

    CacheOnly http://info.cern.ch/*


CacheClean time-spec

Specifies the maximum length of time to keep cache files. Files older than this will be removed, regardless of any expiry date that they specify. This directive can occur a number of times in the configuration file.

    CacheClean http:* 4 weeks


CacheUnused URL-template time-spec

Species the maximum length of time to keep files that have not been accessed. This directive can occur a number of times in the configuration file.


CacheLastModifiedFactor factor                         (0.1)

Proportion of the age of a file to be used as the expiry time if the remote server does not specify an Expires header. The age of the file is given by the Last-Modified header. Thus by default a file that is a year old when it is retrieved will expire in approximately five weeks.

    CacheLastModifiedFactor 0.2


CacheDefaultExpiry url-template time    (dependent on protocol)

Default expiry time for files for which the remote server specifies neither an Expires nor a Last-Modified header.

    CacheDefaultExpiry ftp:* 4 weeks


CacheTimeMargin time-spec                        (2 minutes)

Documents due to expire within the period specified here will not be cached. This margin is used because clocks on different computer systems may not be exactly synchronized.


GcDailyGc time-of-day                                (03:00)

The time at which garbage collection should be started.


GcMemUsage number                                      (500)

Specifies the approximate amount of virtual memory in kilobytes that the server may use while performing garbage collection.


CacheLimit_1 size                            (200 kilobytes)

There are a number of factors taken into consideration by the garbage collector when deciding which files to delete from the cache. Size is one criterion. This parameter specifies a lower size limit, used when prioritizing files for deletion, below which all files are treated as equal.


CacheLimit_2 size                              (4 megabytes)

This parameter specifies an upper size limit, beyond which files are given very high priority for deletion.


CacheLockTimeOut time-spec                      (20 minutes)

A process is created to retrieve a file into the cache. While the file is being retrieved a lock file is created to protect it. If the process dies without finishing the retrieval the lock file may remain. This directive specifies the age at which a lock file is regarded as stale, and may be removed by another server process. The value should not be less than the OutputTimeout value.



CacheAccessLog filename                         (no default)

The pathname of the log file used for recording cache requests.


http_proxy url

Another HTTP proxy server that the server should contact for HTTP requests if the server being configured is part of a chain of proxies.


gopher_proxy url

A Gopher proxy server that the server should contact for Gopher requests if the server being configured is part of a chain of proxies.


ftp_proxy url

An FTP proxy server that the server should contact for FTP requests if the server being configured is part of a chain of proxies.


wais_proxy url

A WAIS proxy server that the server should contact for WAIS requests if the server being configured is part of a chain of proxies.


no_proxy template[,...]

A list of Internet addresses or domains from which the server should retrieve resources directly rather than going through a proxy.

    no_proxy 192.168.*.*,192.168.*.*:8080


next up previous contents index
Next: Command line arguments Up: CERN and NCSA Previous: Server side includes

[ITCP]Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout using the Template Toolkit. The document is mainly of historical interest as obviously many of the sites mentioned have long since disappeared.

 
Copyright © 1996-2002 Ford & Mason Ltd