diff options
author | Michael Vogel <icarus@dabo.de> | 2012-03-11 19:11:25 +0100 |
---|---|---|
committer | Michael Vogel <icarus@dabo.de> | 2012-03-11 19:11:25 +0100 |
commit | 9f76d96d46356b18325ca49c383f94a1958fefd3 (patch) | |
tree | e85ad36d8b515a14f440ab09f62b537b863347ef /include/poller.php | |
parent | b879a1ddf1575a3bd355edcee634be4a8d179c25 (diff) | |
download | volse-hubzilla-9f76d96d46356b18325ca49c383f94a1958fefd3.tar.gz volse-hubzilla-9f76d96d46356b18325ca49c383f94a1958fefd3.tar.bz2 volse-hubzilla-9f76d96d46356b18325ca49c383f94a1958fefd3.zip |
Cache: item cache now has an autodelete of old files. The pages plugin now sets a link via redirection. So posting works.
Diffstat (limited to 'include/poller.php')
-rwxr-xr-x | include/poller.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/poller.php b/include/poller.php index f165ad590..65fafda4c 100755 --- a/include/poller.php +++ b/include/poller.php @@ -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; |