diff --git a/get.php b/get.php index 633c1fb..f55feeb 100644 --- a/get.php +++ b/get.php @@ -273,19 +273,6 @@ function uupGetOnlineFiles($updateId, $rev, $info, $cacheRequests) { $postData = composeFileGetRequest($updateId, uupDevice(), $info, $rev); $out = sendWuPostRequest('https://fe3cr.delivery.mp.microsoft.com/ClientWebService/client.asmx/secured', $postData); consoleLogger('Information has been successfully fetched.'); - - if($cacheRequests == 1) { - $cache = array( - 'expires' => time()+90, - 'content' => $out, - 'fetchTime' => $fetchTime, - ); - - if(!file_exists('cache')) mkdir('cache'); - @file_put_contents('cache/'.$cacheHash.'.json.gz', gzencode(json_encode($cache)."\n")); - - unset($cache); - } } consoleLogger('Parsing information...'); @@ -365,6 +352,17 @@ function uupGetOnlineFiles($updateId, $rev, $info, $cacheRequests) { } } + if($cacheRequests == 1) { + $cache = array( + 'expires' => time()+90, + 'content' => $out, + 'fetchTime' => $fetchTime, + ); + + if(!file_exists('cache')) mkdir('cache'); + @file_put_contents('cache/'.$cacheHash.'.json.gz', gzencode(json_encode($cache)."\n")); + } + return $files; } diff --git a/shared/auths.php b/shared/auths.php index 6468ce4..6e7e67d 100644 --- a/shared/auths.php +++ b/shared/auths.php @@ -1,6 +1,6 @@