Hi all,
Wondering if anyone has an automated cache-flushing script which can
be run as a cron job?
I know the system calls to actually flush the cache, but my problem is
that squid often takes a while to actually shut itself down.
I want to flush the entire cache every day at midnight.
I want to use something like this:
#!/usr/bin/perl
$shutdown_squid = `squid -k shutdown`;
$move_old_cache = `mv /var/spool/squid /var/spool/squidold`;
$make_new_cache = `mkdir /var/spool/squid`;
$change_cache_owner = `chown proxy:proxy /var/spool/squid`;
$rebuild_squid_cache = `squid -z`;
$start_squid = `squid -s`;
$delete_old_cache = `rm -rf /var/spool/squidold`;
But often it runs so quick that squid doesn't get chance to shutdown
before the script tries to restart it.
Any suggestions?
Thanks
Jim
Received on Mon Aug 07 2006 - 04:56:27 MDT
This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:01 MDT