Index: includes/cache.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/cache.inc,v retrieving revision 1.8 diff -u -r1.8 cache.inc --- includes/cache.inc 15 Apr 2007 15:38:35 -0000 1.8 +++ includes/cache.inc 19 Apr 2007 04:52:21 -0000 @@ -26,7 +26,7 @@ // If the data is permanent or we're not enforcing a minimum cache lifetime // always return the cached data. if ($cache->expire == CACHE_PERMANENT || !variable_get('cache_lifetime', 0)) { - $cache->data = db_decode_blob($cache->data); + $cache->data = unserialize(db_decode_blob($cache->data)); } // If enforcing a minimum cache lifetime, validate that the data is // currently valid for this user before we return it by making sure the @@ -39,7 +39,7 @@ return 0; } else { - $cache->data = db_decode_blob($cache->data); + $cache->data = unserialize(db_decode_blob($cache->data)); } } return $cache; @@ -92,9 +92,9 @@ */ function cache_set($cid, $data, $table = 'cache', $expire = CACHE_PERMANENT, $headers = NULL) { db_lock_table($table); - db_query("UPDATE {$table} SET data = %b, created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", $data, time(), $expire, $headers, $cid); + db_query("UPDATE {$table} SET data = %b, created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", serialize($data), time(), $expire, $headers, $cid); if (!db_affected_rows()) { - @db_query("INSERT INTO {$table} (cid, data, created, expire, headers) VALUES ('%s', %b, %d, %d, '%s')", $cid, $data, time(), $expire, $headers); + @db_query("INSERT INTO {$table} (cid, data, created, expire, headers) VALUES ('%s', %b, %d, %d, '%s')", $cid, serialize($data), time(), $expire, $headers); } db_unlock_tables(); } Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.156 diff -u -r1.156 bootstrap.inc --- includes/bootstrap.inc 15 Apr 2007 15:36:10 -0000 1.156 +++ includes/bootstrap.inc 19 Apr 2007 04:52:21 -0000 @@ -365,14 +365,14 @@ function variable_init($conf = array()) { // NOTE: caching the variables improves performance by 20% when serving cached pages. if ($cached = cache_get('variables', 'cache')) { - $variables = unserialize($cached->data); + $variables = $cached->data; } else { $result = db_query('SELECT * FROM {variable}'); while ($variable = db_fetch_object($result)) { $variables[$variable->name] = unserialize($variable->value); } - cache_set('variables', serialize($variables)); + cache_set('variables', $variables); } foreach ($conf as $name => $value) { Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.350 diff -u -r1.350 theme.inc --- includes/theme.inc 17 Apr 2007 07:19:38 -0000 1.350 +++ includes/theme.inc 19 Apr 2007 04:52:22 -0000 @@ -115,7 +115,7 @@ function _theme_load_registry($theme, $theme_engine = NULL) { $cache = cache_get("theme_registry:$theme", 'cache'); if (isset($cache->data)) { - $registry = unserialize($cache->data); + $registry = $cache->data; } else { $registry = _theme_build_registry($theme, $theme_engine); @@ -128,7 +128,7 @@ * Write the theme_registry cache into the database. */ function _theme_save_registry($theme, $registry) { - cache_set("theme_registry:$theme", serialize($registry)); + cache_set("theme_registry:$theme", $registry); } /** Index: modules/locale/locale.module =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v retrieving revision 1.166 diff -u -r1.166 locale.module --- modules/locale/locale.module 15 Apr 2007 15:36:10 -0000 1.166 +++ modules/locale/locale.module 19 Apr 2007 04:52:22 -0000 @@ -208,7 +208,7 @@ locale_refresh_cache(); $cache = cache_get('locale:'. $language->language, 'cache'); } - $locale_t = unserialize($cache->data); + $locale_t = $cache->data; } // We have the translation cached (if it is TRUE, then there is no @@ -268,7 +268,7 @@ while ($data = db_fetch_object($result)) { $t[$data->source] = (empty($data->translation) ? TRUE : $data->translation); } - cache_set('locale:'. $language->language, serialize($t)); + cache_set('locale:'. $language->language, $t); } }