Example #1
0
function ReconstructCaches()
{
    $squid = new squidbee();
    $unix = new unix();
    $main_cache = $squid->CACHE_PATH;
    echo "Starting......:  reconstruct caches\n";
    $squid->cache_list[$squid->CACHE_PATH] = $squid->CACHE_PATH;
    while (list($num, $val) = each($squid->cache_list)) {
        if (is_dir($num)) {
            echo "Starting......:  removing directory {$num}\n";
            shell_exec("/bin/rm -rf {$num}");
        }
    }
    echo "Starting......:  Building caches\n";
    BuildCaches();
}
Example #2
0
function ReconstructCaches()
{
    $squid = new squidbee();
    $unix = new unix();
    $main_cache = $squid->CACHE_PATH;
    echo "Starting......: " . date("H:i:s") . "  reconstruct caches\n";
    $GetCachesInsquidConf = $unix->SQUID_CACHE_FROM_SQUIDCONF();
    while (list($dir, $type) = each($GetCachesInsquidConf)) {
        if (is_dir($dir)) {
            echo "Starting......: " . date("H:i:s") . " Squid removing directory {$num}\n";
            shell_exec("/bin/rm -rf {$dir}");
        }
    }
    echo "Starting......: " . date("H:i:s") . "  Building caches\n";
    BuildCaches();
    caches_infos();
}