Update cache only when there are changes
This commit is contained in:
parent
181198d077
commit
496e015611
14
listid.php
14
listid.php
@ -67,7 +67,10 @@ function uupListIds() {
|
||||
'uuid' => $uuid,
|
||||
);
|
||||
|
||||
$builds = array_merge($builds, array($build.$arch.$title.$uuid => $temp));
|
||||
$builds = array_merge(
|
||||
$builds,
|
||||
array($build.$arch.$title.$uuid => $temp)
|
||||
);
|
||||
}
|
||||
|
||||
krsort($builds);
|
||||
@ -81,9 +84,16 @@ function uupListIds() {
|
||||
|
||||
consoleLogger('Done parsing database info.');
|
||||
|
||||
if($newDb != $database) {
|
||||
if(!file_exists('cache')) mkdir('cache');
|
||||
$success = @file_put_contents('cache/fileinfo.json', json_encode($newDb)."\n");
|
||||
|
||||
$success = @file_put_contents(
|
||||
'cache/fileinfo.json',
|
||||
json_encode($newDb)."\n"
|
||||
);
|
||||
|
||||
if(!$success) consoleLogger('Failed to update database cache.');
|
||||
}
|
||||
|
||||
return array(
|
||||
'apiVersion' => uupApiVersion(),
|
||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
function uupApiVersion() {
|
||||
return '1.1.0';
|
||||
return '1.1.1';
|
||||
}
|
||||
|
||||
function uupApiPrintBrand() {
|
||||
|
Loading…
Reference in New Issue
Block a user