index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-02-13 14:37:51 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-02-13 14:37:51 +0100 |
commit | 5dfac6e689dd6068979869c7cd989cd32e4c6860 (patch) | |
tree | 849bfa4634ab70fe839f9c2a3893edea30958a20 /buildmaster | |
parent | f5175dca32467dbfecfc1d058b99e7b0a19b9764 (diff) |
-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` (" . |