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