Tag Name cache_swap_log
Usage cache_ swap _log Directory-path/filename

Description
This tag specifies the location for the cache “swap.log.” This log file holds the metadata of objects saved on disk. It is used to rebuild the cache during startup. Normally this file resides in the first ‘cache_dir’ directory, but you may specify an alternate pathname here. Note, you must give a full filename, not just a directory. Since this is the index for the whole object list you CANNOT periodically rotate it.

If you have more than one ‘cache_dir’, these swap logs will have names such as:

  • cache_swap_log.00
  • cache_swap_log.01
  • cache_swap_log.02

The numbered extension (which is added automatically) corresponds to the order of the ‘cache_dir’ lines in this configuration file.

Default cache_ swap _log /usr/local/squid/logs/ swap.log

Example
cache_ swap _log /var/log/squid_ swap.log

Caution
If you change the order of the ‘cache_dir’ lines in this file, then these log files will NOT correspond to the correct ‘cache_dir’ entry (unless you manually rename them). We recommend that you do NOT use this option. It is better to keep these log files in each ‘cache_dir’ directory.