From 9c3cf9ab99443923e765fe2d31bd1e8e60d2af31 Mon Sep 17 00:00:00 2001 From: Dale Davies Date: Mon, 25 Jul 2022 17:07:01 +0100 Subject: [PATCH] Add statuscache duration option --- jumpapp/classes/Cache.php | 2 +- jumpapp/config.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/jumpapp/classes/Cache.php b/jumpapp/classes/Cache.php index 54aaec0..1a93b58 100644 --- a/jumpapp/classes/Cache.php +++ b/jumpapp/classes/Cache.php @@ -55,7 +55,7 @@ class Cache { 'sites/status' => [ 'cache' => null, 'expirationtype' => Caching\Cache::EXPIRE, - 'expirationparams' => '5 minutes' + 'expirationparams' => $config->get('statuscache').' minutes' ], 'tags' => [ 'cache' => null, diff --git a/jumpapp/config.php b/jumpapp/config.php index 6d3c25e..7cdaf61 100644 --- a/jumpapp/config.php +++ b/jumpapp/config.php @@ -58,5 +58,8 @@ return [ // Temperature unit: True = metric / False = imperial. 'metrictemp' => getenv('METRICTEMP') ?: true, + // Ping sites to determine availability (e.g. online, offline, errors). 'checkstatus' => getenv('CHECKSTATUS') ?: true, + // Duration to cache status in minutes. + 'statuscache' => getenv('STATUSCACHE') ?: '5' ];