index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | buildmaster/deletion-links.php | 16 |
diff --git a/buildmaster/deletion-links.php b/buildmaster/deletion-links.php index f474dc5..6d21bda 100644 --- a/buildmaster/deletion-links.php +++ b/buildmaster/deletion-links.php @@ -15,15 +15,8 @@ if (isset($_GET["pkgname"])) else $filter = ""; -$memcache = new Memcache; -if ($memcache -> connect('localhost', 11211)) { - $memcache_available = true; - $available_upstream_packages = $memcache -> get('available_upstream_packages'); -} else { - $memcache_available = false; - $available_upstream_packages = false; -} -if ($available_upstream_packages === false) { +$available_upstream_packages = apcu_fetch('available_upstream_packages', $apcu_success); +if ($apcu_success == false) { $available_upstream_packages = explode( "\n", shell_exec( @@ -32,11 +25,8 @@ if ($available_upstream_packages === false) { "| sort -u" ) ); - if ($memcache_available) - $memcache -> set('available_upstream_packages',$available_upstream_packages,0,1800); + apcu_store('available_upstream_packages', $available_upstream_packages, 1800); } -if ($memcache_available) - $memcache -> close(); mysql_run_query( "CREATE TEMPORARY TABLE `available` (" . |