cvs: php-master-web /fetch mirrors.php

From: Date: Tue, 28 Feb 2006 20:56:24 +0000
Subject: cvs: php-master-web /fetch mirrors.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-30732@lists.php.net to get a copy of this message
rasmus Tue Feb 28 20:56:24 2006 UTC Modified files: /php-master-web/fetch mirrors.php Log: Cache the big mirror array if possible http://cvs.php.net/viewcvs.cgi/php-master-web/fetch/mirrors.php?r1=1.23&r2=1.24&diff_format=u Index: php-master-web/fetch/mirrors.php diff -u php-master-web/fetch/mirrors.php:1.23 php-master-web/fetch/mirrors.php:1.24 --- php-master-web/fetch/mirrors.php:1.23 Fri Aug 6 08:54:58 2004 +++ php-master-web/fetch/mirrors.php Tue Feb 28 20:56:24 2006 @@ -6,7 +6,7 @@ // Info on the $MIRRORS array structure and some constants $structinfo = " /* - Structure of an element of the $MIRRORS array: + Structure of an element of the \$MIRRORS array: 0 Country code 1 Provider name @@ -31,7 +31,7 @@ define('MIRROR_NOTACTIVE', 1); define('MIRROR_OUTDATED', 2); define('MIRROR_DOESNOTWORK', 3); - +if(!\$APC || (\$APC && !\$MIRRORS = apc_fetch('mirrors'))) { "; // A token is required, since this should only get accessed from rsync.php.net @@ -96,7 +96,7 @@ " \"$row[providerurl]\", $row[mirrortype], $row[has_search],\n" . " \"$row[lang]\", $status),\n"; } - echo ");\n"; + echo ");\nif(\$APC) apc_store('mirrors',\$MIRRORS);\n}\n"; } } }

« previous php.mirrors (#30732) next »