mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
All $cache->set calls should have $ttl
This commit is contained in:
parent
7c3ebf70fa
commit
37ba9c7366
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user