diff --git a/www/adium.im/sparkle/appcast-nightly.php b/www/adium.im/sparkle/appcast-nightly.php
index ca8c59f..121ef2c 100644
--- a/www/adium.im/sparkle/appcast-nightly.php
+++ b/www/adium.im/sparkle/appcast-nightly.php
@@ -8,21 +8,29 @@
     }
     
     function existing_branch($repo, $branch) {
-        if (is404(sprintf("http://%s/$repo-$branch/", NIGHTLY_DOMAIN)) {
+        if (is404($repo, $branch)) {
             $branch = "default";
-            if (is404(sprintf("http://%s/$repo-$branch/", NIGHTLY_DOMAIN)) {
+            if (is404($repo, $branch)) {
                 $repo = "adium";
             }
         }
         return array($repo, $branch); 
     }
     
-    function is404($url) {
+    function is404($repo, $branch) {
+        $url = sprintf("http://%s/$repo-$branch/", NIGHTLY_DOMAIN);
+        $url_cache = $config["cachedgraphs"] . "/url_cache/$repo-$branch.dat";
+        $result = "404 Not Found";
+        if ((!is_file($url_cache) || (($stat = stat(url_cache)) && ($stat[10]+UPDATE_INTERVAL <= time())))) {
         $c = curl_init($url);
         curl_setopt($c, CURLOPT_NOBODY, TRUE);
         curl_setopt($c, CURLOPT_RETURNTRANSFER, TRUE);
         $result = curl_exec($c);
         curl_close($c);
+            @file_put_contents($url_cache, $result);
+        } else {
+            $result = @file_get_contents($url_cache);
+        }
         return (strpos($result, "404 Not Found") !== FALSE);
     }
     
