The caches are now cleared only once an hour.
This commit is contained in:
parent
bbec7a1ed9
commit
5bc6896671
|
@ -99,6 +99,15 @@ function poller_run(&$argv, &$argc){
|
|||
proc_run('php','include/expire.php');
|
||||
}
|
||||
|
||||
$last = get_config('system','cache_last_cleared');
|
||||
|
||||
if($last) {
|
||||
$next = $last + (3600); // Once per hour
|
||||
$clear_cache = ($next <= time());
|
||||
} else
|
||||
$clear_cache = true;
|
||||
|
||||
if ($clear_cache) {
|
||||
// clear old cache
|
||||
Cache::clear();
|
||||
|
||||
|
@ -108,6 +117,9 @@ function poller_run(&$argv, &$argc){
|
|||
// clear cache for photos
|
||||
clear_cache($a->get_basepath(), $a->get_basepath()."/photo");
|
||||
|
||||
set_config('system','cache_last_cleared', time());
|
||||
}
|
||||
|
||||
$manual_id = 0;
|
||||
$generation = 0;
|
||||
$hub_update = false;
|
||||
|
|
|
@ -1689,7 +1689,7 @@ div.pager, .birthday-notice, ul.tabs a, #jot-preview-link, .comment-edit-submit-
|
|||
border: 1px solid lightgray;
|
||||
color: black;
|
||||
background: #F2F2F2;
|
||||
padding: 3px 7px 2px 7px;
|
||||
padding: 2px 7px 2px 7px;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
|
||||
|
|
Loading…
Reference in a new issue