Show
Ignore:
Timestamp:
07/08/2008 10:08:39 AM (5 months ago)
Author:
Shadowhand
Message:

Fixing #678, thanks Adura.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/drivers/Cache/Xcache.php

    r2593 r3005  
    4141        public function delete($id, $tag = FALSE) 
    4242        { 
    43                 if ($id === TRUE) 
     43                if ($tag !== FALSE) 
    4444                { 
    4545                        Log::add('error', 'Cache: tags are unsupported by the Xcache driver'); 
    4646                        return TRUE; 
    4747                } 
    48                 elseif ($tag == FALSE) 
     48                elseif($id !== TRUE) 
     49                { 
     50                        if (xcache_isset($id)) 
     51                                return xcache_unset($id); 
     52 
     53                        return FALSE; 
     54                } 
     55                else 
    4956                { 
    5057                        // Do the login 
    5158                        $this->auth(); 
    52  
    5359                        $result = TRUE; 
    5460                        for ($i = 0, $max = xcache_count(XC_TYPE_VAR); $i < $max; $i++) 
    5561                        { 
    56                                 if ( ! xcache_clear_cache(XC_TYPE_VAR, $i)) 
     62                                if (xcache_clear_cache(XC_TYPE_VAR, $i) !== NULL) 
    5763                                { 
    5864                                        $result = FALSE; 
     
    6571                        return $result; 
    6672                } 
    67                 else 
    68                 { 
    69                         return TRUE; 
    70                 } 
     73                 
     74                return TRUE; 
     75        } 
     76 
     77        public function delete_all() 
     78        { 
     79                return TRUE; 
    7180        } 
    7281 
     
    105114                                } 
    106115 
    107                                 $_SERVER[$key] = Config::item('cache_xcache.__'.$key); 
     116                                $_SERVER[$key] = Config::item('cache_xcache.'.$key); 
    108117                        } 
    109118                }