Thanks. That's essentially what I'm doing, as well.
#------------------------------------------------------------
# subroutine to flush the squid cache
#------------------------------------------------------------
sub flushCache ($)
{
system ("/etc/rc.d/init.d/squid stop") == 0
or die ("Error occurred while stopping squid.\n");
system ("echo \"\" > /var/spool/squid/swap.state") == 0
or die ("Error occurred while flushing cache.\n");
system ("/etc/rc.d/init.d/squid start") == 0
or die ("Error occurred while starting squid.\n");
showInitial ($q, "Squid Cache has been cleared successfully. [
refresh ]");
return;
}
I've got it integrated into a server-manager panel. I'm adding some other Squid Properties that seem useful, then I'll post it here.
Thanks, again.