Changeset 507 for trunk/WordPress/plugin/transposh/wp/transposh_db.php
- Timestamp:
- 08/13/2010 01:39:36 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/wp/transposh_db.php
r505 r507 64 64 if ($rc === false) return false; 65 65 logger('apc', 5); 66 } 67 elseif (function_exists('xcache_get')) { 66 } elseif (function_exists('xcache_get')) { 68 67 $rc = xcache_isset($key); 69 68 if ($rc === false) return false; 70 69 $cached = xcache_get($key); 71 70 logger('xcache', 5); 71 } elseif (function_exists('eaccelerator_get')) { 72 $cached = eaccelerator_get($key); 73 if ($cached === null) 74 return false; //TODO - unfortunantly null storing does not work here.. 75 logger('eaccelerator', 5); 72 76 } 73 77 logger("Cached: $original", 5); … … 96 100 } elseif (function_exists('xcache_set')) { 97 101 $rc = xcache_set($key, $cache_entry, $ttl); 98 } 102 } elseif (function_exists('eaccelerator_put')) { 103 $rc = eaccelerator_put($key, $cache_entry, $ttl); 104 } 105 99 106 if ($rc) { 100 107 logger("Stored in cache: $original => {$translated[0]},{$translated[1]}", 3); … … 115 122 } elseif (function_exists('xcache_unset')) { 116 123 xcache_unset($key); 124 } elseif (function_exists('eaccelerator_rm')) { 125 eaccelerator_rm($key); 117 126 } 118 127 } … … 123 132 function cache_clean() { 124 133 if (!TP_ENABLE_CACHE) return; 125 if (function_exists('apc_clear_cache')) apc_clear_cache('user'); 126 elseif (function_exists('xcache_unset_by_prefix')) 127 xcache_unset_by_prefix(); 134 if (function_exists('apc_clear_cache')) { 135 apc_clear_cache('user'); 136 } elseif (function_exists('xcache_unset_by_prefix')) { 137 xcache_unset_by_prefix(); 138 } 139 //TODO - clean on eaccelerator is not so clean... 128 140 } 129 141
Note: See TracChangeset
for help on using the changeset viewer.
