Changeset 3005 for trunk/system/libraries/drivers/Cache/Xcache.php
- Timestamp:
- 07/08/2008 10:08:39 AM (5 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/drivers/Cache/Xcache.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/drivers/Cache/Xcache.php
r2593 r3005 41 41 public function delete($id, $tag = FALSE) 42 42 { 43 if ($ id === TRUE)43 if ($tag !== FALSE) 44 44 { 45 45 Log::add('error', 'Cache: tags are unsupported by the Xcache driver'); 46 46 return TRUE; 47 47 } 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 49 56 { 50 57 // Do the login 51 58 $this->auth(); 52 53 59 $result = TRUE; 54 60 for ($i = 0, $max = xcache_count(XC_TYPE_VAR); $i < $max; $i++) 55 61 { 56 if ( ! xcache_clear_cache(XC_TYPE_VAR, $i))62 if (xcache_clear_cache(XC_TYPE_VAR, $i) !== NULL) 57 63 { 58 64 $result = FALSE; … … 65 71 return $result; 66 72 } 67 else 68 { 69 return TRUE; 70 } 73 74 return TRUE; 75 } 76 77 public function delete_all() 78 { 79 return TRUE; 71 80 } 72 81 … … 105 114 } 106 115 107 $_SERVER[$key] = Config::item('cache_xcache. __'.$key);116 $_SERVER[$key] = Config::item('cache_xcache.'.$key); 108 117 } 109 118 }
