Ticket #678: Xcache_patch.diff
| File Xcache_patch.diff, 1.4 kB (added by Adura, 5 months ago) |
|---|
-
Xcache.php
old new 40 40 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; 59 65 break; … … 64 70 $this->auth(TRUE); 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 73 82 public function delete_expired() … … 104 113 $backup[$key] = $value; 105 114 } 106 115 107 $_SERVER[$key] = Config::item('cache_xcache. __'.$key);116 $_SERVER[$key] = Config::item('cache_xcache.'.$key); 108 117 } 109 118 } 110 119 } 111 120 112 } // End Cache Xcache Driver 113 No newline at end of file 121 } // End Cache Xcache Driver
