From 930830936f3d53fcfde60d14a408c5add6679a22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 5 Dec 2008 23:58:36 +0000 Subject: [PATCH 1/1] Cache does no longer try to close non-existing cache --- inc/databases.php | 2 +- inc/libs/cache_functions.php | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index 04b81d6fd0..f0865f617a 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "602"); +define('CURR_SVN_REVISION', "603"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index d5b3639477..c2b92decb9 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -243,11 +243,16 @@ class mxchange_cache function cache_destroy() { // Is the cache file there? if (FILE_READABLE($this->cache_inc)) { + // Close cache + $this->close_cache(); + // Remove cache file from system unlink($this->cache_inc); + + // Is the file there? if (!FILE_READABLE($this->cache_inc)) { - // Close cache automatically (we don't need it anymore!) - $this->cache_close(); + // The cache does no longer exist so kill the content + unset($this->cache_data[$this->cache_file]); } else { // Not removed! ADD_FATAL(__FILE__."(".__LINE__."): ".CACHE_CANNOT_UNLINK_1.$this->cache_inc.CACHE_CANNOT_UNLINK_2); -- 2.30.2