All $cache->set calls should have $ttl

This commit is contained in:
slawkens 2025-01-17 22:55:35 +01:00
parent 7c3ebf70fa
commit 37ba9c7366
3 changed files with 5 additions and 5 deletions

View File

@ -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);
}
}
}

View File

@ -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);

View File

@ -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);
}
}
}