index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | buildmaster/deletion-links.php | 7 | ||||
-rw-r--r-- | lib/helper.php | 7 | ||||
-rw-r--r-- | packages/pkginfo.php | 1 |
diff --git a/buildmaster/deletion-links.php b/buildmaster/deletion-links.php index 066bf8d..9f55c89 100644 --- a/buildmaster/deletion-links.php +++ b/buildmaster/deletion-links.php @@ -16,8 +16,8 @@ else $filter = ""; $memcache = new Memcache; -$memcache->connect('localhost', 11211) or die ('Memcached Connection Error'); -$available_upstream_packages = $memcache->get('available_upstream_packages'); +$memcache -> connect('localhost', 11211) or die ('Memcached Connection Error'); +$available_upstream_packages = $memcache -> get('available_upstream_packages'); if ($available_upstream_packages === false) { $available_upstream_packages = explode( "\n", @@ -27,8 +27,9 @@ if ($available_upstream_packages === false) { "| sort -u" ) ); - $memcache->set('available_upstream_packages',$available_upstream_packages,0,1800); + $memcache -> set('available_upstream_packages',$available_upstream_packages,0,1800); } +$memcache -> close(); mysql_run_query( "CREATE TEMPORARY TABLE `available` (" . diff --git a/lib/helper.php b/lib/helper.php index 8c910ac..b9a62fb 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -89,16 +89,17 @@ function git_url($repository,$type,$commit,$path,$line = null,$commit_is_hash = global $git_available; if (!isset($git_available)) { $memcache = new Memcache; - $memcache->connect('localhost', 11211) or die ('Memcached Connection Error'); - $git_available = $memcache->get('git_available'); + $memcache -> connect('localhost', 11211) or die ('Memcached Connection Error'); + $git_available = $memcache -> get('git_available'); if ($git_available === false) { $git_available = preg_match( "/ 200 OK$/", get_headers("https://git.archlinux32.org/archlinux32/packages")[0] ); - $memcache->set('git_available',$git_available,0,120); + $memcache -> set('git_available',$git_available,0,120); }; + $memcache -> close(); $git_available = $git_available == 1; } if (!isset($commit_is_hash)) diff --git a/packages/pkginfo.php b/packages/pkginfo.php index 2f42f5e..b8662df 100644 --- a/packages/pkginfo.php +++ b/packages/pkginfo.php @@ -45,6 +45,7 @@ require_once BASE . "/lib/style.php"; $pkgapi_reachable = 'NO'; $memcache -> set('pkgapi_reachable', $pkgapi_reachable, 0, 300); } + $memcache -> close(); if ($pkgapi_reachable == 'YES') $skip_json_checks = false; else |