Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/buildmaster
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-02-13 14:37:51 +0100
committerErich Eckner <git@eckner.net>2019-02-13 14:37:51 +0100
commit5dfac6e689dd6068979869c7cd989cd32e4c6860 (patch)
tree849bfa4634ab70fe839f9c2a3893edea30958a20 /buildmaster
parentf5175dca32467dbfecfc1d058b99e7b0a19b9764 (diff)
use apcu instead of memcache
Diffstat (limited to 'buildmaster')
-rw-r--r--buildmaster/deletion-links.php16
1 files changed, 3 insertions, 13 deletions
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` (" .