From 37ba9c7366139778d09d1316d7cb49a255165778 Mon Sep 17 00:00:00 2001 From: slawkens Date: Fri, 17 Jan 2025 22:55:35 +0100 Subject: [PATCH] All $cache->set calls should have $ttl --- index.php | 4 ++-- system/init.php | 4 ++-- system/template.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 8cd36247..90a5fc15 100644 --- a/index.php +++ b/index.php @@ -221,7 +221,7 @@ if(isset($config['anonymous_usage_statistics']) && $config['anonymous_usage_stat if(fetchDatabaseConfig('last_usage_report', $value)) { $should_report = time() > (int)$value + $report_time; if($cache->enabled()) { - $cache->set('last_usage_report', $value); + $cache->set('last_usage_report', $value, 60 * 60); } } else { @@ -236,7 +236,7 @@ if(isset($config['anonymous_usage_statistics']) && $config['anonymous_usage_stat updateDatabaseConfig('last_usage_report', time()); if($cache->enabled()) { - $cache->set('last_usage_report', time()); + $cache->set('last_usage_report', time(), 60 * 60); } } } diff --git a/system/init.php b/system/init.php index 86670247..0d89a22c 100644 --- a/system/init.php +++ b/system/init.php @@ -74,8 +74,8 @@ if($config_lua_reload) { // cache config if($cache->enabled()) { - $cache->set('config_lua', serialize($config['lua']), 120); - $cache->set('server_path', $config['server_path']); + $cache->set('config_lua', serialize($config['lua']), 2 * 60); + $cache->set('server_path', $config['server_path'], 10 * 60); } } unset($tmp); diff --git a/system/template.php b/system/template.php index 80759770..cddab631 100644 --- a/system/template.php +++ b/system/template.php @@ -83,7 +83,7 @@ else { unset($file); if ($cache->enabled()) { - $cache->set('template_ini_' . $template_name, serialize($template_ini)); + $cache->set('template_ini_' . $template_name, serialize($template_ini), 10 * 60); } } }