Skip to content

Commit 37ba9c7

Browse files
committed
All $cache->set calls should have $ttl
1 parent 7c3ebf7 commit 37ba9c7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

index.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
if(fetchDatabaseConfig('last_usage_report', $value)) {
222222
$should_report = time() > (int)$value + $report_time;
223223
if($cache->enabled()) {
224-
$cache->set('last_usage_report', $value);
224+
$cache->set('last_usage_report', $value, 60 * 60);
225225
}
226226
}
227227
else {
@@ -236,7 +236,7 @@
236236

237237
updateDatabaseConfig('last_usage_report', time());
238238
if($cache->enabled()) {
239-
$cache->set('last_usage_report', time());
239+
$cache->set('last_usage_report', time(), 60 * 60);
240240
}
241241
}
242242
}

system/init.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474

7575
// cache config
7676
if($cache->enabled()) {
77-
$cache->set('config_lua', serialize($config['lua']), 120);
78-
$cache->set('server_path', $config['server_path']);
77+
$cache->set('config_lua', serialize($config['lua']), 2 * 60);
78+
$cache->set('server_path', $config['server_path'], 10 * 60);
7979
}
8080
}
8181
unset($tmp);

system/template.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
unset($file);
8484

8585
if ($cache->enabled()) {
86-
$cache->set('template_ini_' . $template_name, serialize($template_ini));
86+
$cache->set('template_ini_' . $template_name, serialize($template_ini), 10 * 60);
8787
}
8888
}
8989
}

0 commit comments

Comments
 (0)