Sun Java System Web Proxy Server 4.0.2 2005Q4 Configuration File Reference

Cache Elements

Cache elements are as follows:

FILECACHE

Configures the in-memory cache.

Subelements

The following table describes subelements for the FILECACHE element.

Table 2–21 FILECACHE subelements

Element  

Required  

Description  

DESCRIPTION

zero or one 

Contains a text description of this element. 

Attributes

The following table describes attributes for the FILEACHE element.

Table 2–22 FILECACHE attributes

Attribute  

Default  

Description  

enabled

true 

Select this option, if not already selected. 

transmitfile

false 

When you enable Transmit File, the server caches open file descriptors for files in the file cache, rather than the file contents, and PR_TransmitFile is used to send the file contents to a client. When Transmit File is enabled, the distinction normally made by the file cache between small, medium, and large files no longer applies, because only the open file descriptor is being cached. 

contentcache

true 

Enables caching file content. 

tempdir

 

Specifies the directory to store temporary files. 

maxage

30 

The maximum age in seconds of a valid cache entry. This setting controls how long cached information will continue to be used once the file is cached. An entry older than MaxAge is replaced by a new entry for the same file, if the same file is referenced through the cache. 

mediumfilesizelimit

537600 

Size in bytes of the largest (non-small) file that is considered to be medium size. The contents of medium files are cached by mapping the file into virtual memory (currently only on Unix platforms). The contents of "large" files (larger than "medium") are not cached, although information about large files is cached. 

mediumfilespace

10485760 

Specifies how much virtual memory will be used to map all medium sized files. 

smallfilesizelimit

2048 

Size in bytes of the largest file that is considered to be "small". The contents of small files are cached by allocating heap space and reading the file into it. 

smallfilespace

1048576 

Specifies how much heap space will be used for the cache, including heap space used to cache small files. 

maxfiles

1024 

The maximum number of files that may be in the cache at once. 

hashinitsize

 

CACHE

Configures the disk cache.

Subelements

The following table describes subelements for the CACHE element.

Table 2–23 CACHE subelements

Element  

Required  

Description  

DESCRIPTION

zero or one 

Contains a text description of this element. 

PARTITION

one or more 

Cache partition is a reserved part of disk or memory that is set aside for caching purposes. 

GC

zero or one 

Cache garbage collector is used to delete files from the cache. Garbage collection can be done in either the automatic mode or the explicit mode. 

Attributes

The following table describes attributes for the CACHE element.

Table 2–24 CACHE attributes

Attribute  

Default  

Description  

enabled

true 

Select this option, if not already selected. 

cachedir

<Install_Root>/<Instance_Directory>/cache

Specifies the directory for caching. 

cachecapacity

2000MB 

The cache capacity should be set equal to or greater than the cache size. Setting the capacity larger than the cache size can be helpful if you know that you plan to increase the cache size later, such as by adding an external disk. 

PARTITION

Configures the storage area on a disk that you set aside for caching. If you wish to have your cache span several disks, you need to configure at least one cache partition for each disk. Each partition can be independently administered. In other words, you can enable, disable, and configure a partition independently of all other partitions.

Subelements

The following table describes subelements for the PARTITION element.

Table 2–25 CACHE subelements

Element  

Required  

Description  

DESCRIPTION

zero or one 

Contains a text description of this element. 

Attributes

The following table describes attributes for the PARTITION element.

Table 2–26 CACHE attributes

Attribute  

Default  

Description  

enabled

true 

Select this option, if not already selected. 

partitiondir

<Install_Root>/<Instance_Directory>/cache

Specify the directory where the partition is to be created. 

partitionname

part1 

Specify a name for the partition. 

maxsize

1600MB 

The optional number for the maximum size, in megabytes, to allow for the cache partition to grow. 

minspace

5MB 

The minimum amount of available space, in megabytes, on the physical partition. This is the actual disk on which the cache partition resides. If less space is available, the proxy stops caching to that cache partition, even if it has not reached the maximum size (max-size). It continues to write to other partitions that are not full. 

GC

Configures the cache garbage collector that deletes files from the cache. Garbage collection can be done in either the automatic mode or the explicit mode.

Subelements

The following table describes subelements for the GC element.

Table 2–27 CACHE subelements

Element  

Required  

Description  

DESCRIPTION

zero or one 

Contains a text description of this element. 

Attributes

The following table describes attributes for the GC element.

Table 2–28 CACHE attributes

Attribute  

Default  

Description  

enabled

true 

Select this option, if not already selected. 

gchimargin

80 

Controls the percentage of the maximum cache size that, when reached, triggers garbage collection. 

gclomargin

70 

Controls the percentage of the maximum cache size that the garbage collector targets. 

gcleavefsfull

60 

Determines the percentage of the cache partition size below which garbage collection will not go. 

gcextramargin

30 

Sets the percentage of the cache to be removed by the garbage collector.