summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
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 c814261..d37a6d5 100644
--- a/it_url.class
+++ b/it_url.class
@@ -708,8 +708,8 @@ static function get_cache($p = array())
$isnight = date('H') >= 1 && date('H')*3600 + date('i')*60 < $p['cleanbefore'];
if (time() - @filemtime($p['cachedir'] . "/cleaned") > ($isnight ? 80000 : 2*80000))
{
- it::file_put($p['cachedir'] . "/cleaned", ""); # touch could have permission problems
- $maxagemin = intval($p['maxage']/60);
+ $maxagemin = round($p['maxage']/60, 2);
+ it::file_put($p['cachedir'] . "/cleaned", "$maxagemin\n");
exec("nohup bash -c 'cd {$p['cachedir']} && for i in [0-9a-f][0-9a-f]; do sleep 20; ionice -c 3 find \$i -mmin +$maxagemin -type f -delete; done' </dev/null >/dev/null 2>&1 &");
}