All $cache->set calls should have $ttl

This commit is contained in:
slawkens 2025-01-12 17:13:25 +01:00
parent 77a2c1cec3
commit 085ebbcfde
3 changed files with 5 additions and 5 deletions

View File

@ -134,7 +134,7 @@ if(setting('core.anonymous_usage_statistics')) {
if(fetchDatabaseConfig('last_usage_report', $value)) { if(fetchDatabaseConfig('last_usage_report', $value)) {
$should_report = time() > (int)$value + $report_time; $should_report = time() > (int)$value + $report_time;
if($cache->enabled()) { if($cache->enabled()) {
$cache->set('last_usage_report', $value); $cache->set('last_usage_report', $value, 60 * 60);
} }
} }
else { else {
@ -148,7 +148,7 @@ if(setting('core.anonymous_usage_statistics')) {
updateDatabaseConfig('last_usage_report', time()); updateDatabaseConfig('last_usage_report', time());
if($cache->enabled()) { if($cache->enabled()) {
$cache->set('last_usage_report', time()); $cache->set('last_usage_report', time(), 60 * 60);
} }
} }
} }

View File

@ -96,8 +96,8 @@ if($config_lua_reload) {
// cache config // cache config
if($cache->enabled()) { if($cache->enabled()) {
$cache->set('config_lua', serialize($config['lua']), 120); $cache->set('config_lua', serialize($config['lua']), 2 * 60);
$cache->set('server_path', $config['server_path']); $cache->set('server_path', $config['server_path'], 10 * 60);
} }
} }
unset($tmp); unset($tmp);

View File

@ -95,7 +95,7 @@ else {
unset($file); unset($file);
if ($cache->enabled()) { if ($cache->enabled()) {
$cache->set('template_ini_' . $template_name, serialize($template_ini)); $cache->set('template_ini_' . $template_name, serialize($template_ini), 10 * 60);
} }
} }
} }