Garbage collection

As part of the effort to keep popular URLs cached and minimize usage of system resources, Caching Proxy performs the cleanup process known as garbage collection, in which old or unused files are removed from the cache to make room for more-current files.

The garbage collection process examines the files in the cache directory and attempts to eliminate expired files to reduce the size of the cache and make room for new files. Garbage collection is done automatically, but some settings can be configured to tailor the process to your needs.

Configuring garbage collection

To configure garbage collection, in the Configuration and Administration forms, select Cache Configuration -> Garbage Collection Settings. Use this form to set the high water mark and low water mark, which determine when garbage collection is started and stopped. When the amount of space used in the cache reaches or exceeds the percentage set for the high water mark, garbage collection begins. Garbage collection continues until the percentage of used space in the cache is equal to or less than the value set for the low water mark.

You can choose between two garbage-collection algorithms. The responsetime algorithm optimizes the time required to respond to users by preferentially removing large files from the cache. The bandwidth algorithm optimizes the use of network bandwidth by preferentially removing smaller files from the cache. Choose either, or a blend of the two.

To configure garbage collection by editing the proxy configuration file, see the reference sections for the following directives: