X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fcache_functions.php;h=c2b92decb910d1aae6054724d6bc358b5636fdcb;hp=d5b3639477adb24ff08b65b35794b764c33a3bc3;hb=930830936f3d53fcfde60d14a408c5add6679a22;hpb=249af9b67343a73df780d95982ccc32d81e564ab 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);