Cache: item cache now has an autodelete of old files. The pages plugin now sets a link via redirection. So posting works.

This commit is contained in:
Michael Vogel 2012-03-11 19:11:25 +01:00
parent b879a1ddf1
commit 9f76d96d46
3 changed files with 17 additions and 3 deletions

View file

@ -69,6 +69,19 @@ function poller_run($argv, $argc){
// clear old cache
Cache::clear();
// clear item cache files if they are older than one day
$cache = get_config('system','itemcache');
if (($cache != '') and is_dir($cache)) {
if ($dh = opendir($cache)) {
while (($file = readdir($dh)) !== false) {
$fullpath = $cache."/".$file;
if ((filetype($fullpath) == "file") and filectime($fullpath) < (time() - 1800))
unlink($fullpath);
}
closedir($dh);
}
}
$manual_id = 0;
$generation = 0;
$hub_update = false;