From: Roland Häder Date: Fri, 12 Sep 2008 12:22:51 +0000 (+0000) Subject: RDF cache garbage collector does no longer kill MXChange cache files X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=f33497b304b5b1ab26e9b18b141f755bd97fc9c1 RDF cache garbage collector does no longer kill MXChange cache files --- diff --git a/inc/databases.php b/inc/databases.php index ad211969f3..28f1bb9154 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "307"); +define('CURR_SVN_REVISION', "308"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/rdf.class.php b/inc/rdf.class.php index 350976fde6..beaf027feb 100644 --- a/inc/rdf.class.php +++ b/inc/rdf.class.php @@ -1205,8 +1205,8 @@ class fase4_rdf { if (rand(1, 100) <= $this->gc_probability) { $dir = dir($this->_cache_dir); while($file=$dir->read()) { - if($file!="." AND $file!=".." AND filemtime($dir->path.$file) <= time() - $this->_refresh ) { - @unlink($dir->path.$file); + if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && filemtime($dir->path.$file) <= time() - $this->_refresh ) { + @unlink($dir->path.$file); } } $dir->close();