Add file-based API cache — monitor and arrs pages now serve from /tmp/vv_cache instead of making live HTTP calls on every page load
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
require_once dirname(__DIR__) . '/include/config.php';
|
||||
|
||||
$_vv_cached = vv_cache_read('arrs', 90);
|
||||
if ($_vv_cached !== null) { echo json_encode($_vv_cached); exit; }
|
||||
unset($_vv_cached);
|
||||
|
||||
require_once dirname(__DIR__) . '/include/arrs.php';
|
||||
echo json_encode(vv_arrs_all());
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
require_once dirname(__DIR__) . '/include/config.php';
|
||||
|
||||
$_vv_cached = vv_cache_read('monitor', 90);
|
||||
if ($_vv_cached !== null) { echo json_encode($_vv_cached); exit; }
|
||||
unset($_vv_cached);
|
||||
|
||||
require_once dirname(__DIR__) . '/include/monitor.php';
|
||||
require_once dirname(__DIR__) . '/include/vms.php';
|
||||
require_once dirname(__DIR__) . '/include/docker_folders.php';
|
||||
|
||||
Reference in New Issue
Block a user