summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorUrban Müller2022-10-25 18:25:31 +0200
committerUrban Müller2022-10-25 18:25:31 +0200
commita322554d7bd21c52c551178ed5f1a706dcd6d112 (patch)
treed710ac9c46333c5e2bd4db3c3121a13617758f8c /it_url.class
parentcb55bfaf566ef14c41024c5441b8c2425a212578 (diff)
downloaditools-a322554d7bd21c52c551178ed5f1a706dcd6d112.tar.gz
itools-a322554d7bd21c52c551178ed5f1a706dcd6d112.tar.bz2
itools-a322554d7bd21c52c551178ed5f1a706dcd6d112.zip
ignore cache cleanup time restriction of last cleanup was long ago
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class
index cc5f816..16c04b8 100644
--- a/it_url.class
+++ b/it_url.class
@@ -687,8 +687,8 @@ static function get_cache($p = array())
}
}
- # cache cleanup at night
- if (date('H') >= 1 && (date('H')*3600 + date('i')*60 < $p['cleanbefore']) && (time()-@filemtime($p['cachedir'] . "/cleaned") > 80000))
+ # cache cleanup preferably at night
+ if (time() - @filemtime($p['cachedir'] . "/cleaned") > (date('H') >= 1 && (date('H')*3600 + date('i')*60 < $p['cleanbefore'] ? 80000 : 2*80000)))
{
it::file_put($p['cachedir'] . "/cleaned", ""); # touch could have permission problems
$maxagemin = intval($p['maxage']/60);