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__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->cache_inc.CACHE_CANNOT_UNLINK_2);