#!/usr/local/bin/php -q 75) { $rotate_reason .= "$cachedir/swap.state file is taking up more than 75% of disk space. "; } if ($diskusedpct > 90) { $rotate_reason .= "$cachedir filesystem is $diskusedpct pct full. "; } if ($swapstate_size > 1024*1024*1024) { $rotate_reason .= "$cachedir/swap.state is larger than 1GB. "; } if ($settings['clear_cache'] == 'on') { $rotate_reason .= "'Clear Cache on Log Rotate' is enabled in 'Local Cache' settings. "; } if ($argv[1] == "clean") { $rotate_reason .= "Clear cache forced by cronjob. "; } if (($swapstate_pct > 75) || (($diskusedpct > 90) && ($swapstate_size > 1024*1024*1024)) || $argv[1] == "clean") { squid_dash_z('clean'); log_error(gettext(sprintf("$rotate_reason Removing and rotating. File was %d bytes, %d%% of total disk space.", $swapstate_size, $swapstate_pct))); } } ?>