public static function purge($url) { self::$result = array(); $result = true; foreach(self::$servers as $server) { $serverinfo = explode(':', $server); if (!isset($serverinfo[1])) $serverinfo[1] = '80'; $temp = self::_purge($serverinfo[0], $url, $serverinfo[1]); $result = $result && $temp; self::$result[$server] = $temp; } return $result; }
if (false === strpos($u, '?')) { $u .= '?nocache=1'; } else { $u .= '&nocache=1'; } $cleanCacheUrls[] = $u; } } } if (false == empty($cleanCacheUrls)) { $remoter->multiRequest($cleanCacheUrls); } //clean squid foreach ($urls as $u) { if ($u) { $result = Lib_Internet_Squid::purge($u); if ($method == 'forward') { header("X-Purge-Result: {$result}-{$u}"); } else { $text .= $u . ' ' . ($result ? 'OK' : 'ERR') . '<BR>'; } $forward = $u; } } } if ($method == 'forward') { header("Location: {$u}"); exit; } ?> <html>