? node_load_rollback.patch
? node_load_rollback_1.patch
Index: modules/book/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.module,v
retrieving revision 1.439
diff -u -p -r1.439 book.module
--- modules/book/book.module	25 Aug 2007 09:25:48 -0000	1.439
+++ modules/book/book.module	30 Aug 2007 15:20:46 -0000
@@ -564,8 +564,6 @@ function book_remove_form_submit($form, 
     // Only allowed when this is not a book (top-level page).
     menu_link_delete($node->book['mlid']);
     db_query('DELETE FROM {book} WHERE nid = %d', $node->nid);
-    // Clear the node load cache.
-    cache_clear_all('*', 'cache_node', TRUE);
     drupal_set_message(t('The post has been removed from the book.'));
   }
   $form_state['redirect'] = 'node/'. $node->nid;
@@ -611,8 +609,6 @@ function _book_update_outline(&$node) {
         // Update the bid for this page and all children.
         book_update_bid($node->book);
       }
-      // Clear the node load cache.
-      cache_clear_all('*', 'cache_node', TRUE);
     }
     return TRUE;
   }
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.576
diff -u -p -r1.576 comment.module
--- modules/comment/comment.module	29 Aug 2007 17:01:33 -0000	1.576
+++ modules/comment/comment.module	30 Aug 2007 15:20:50 -0000
@@ -2035,7 +2035,6 @@ function _comment_update_node_statistics
     $node = db_fetch_object(db_query("SELECT uid, created FROM {node} WHERE nid = %d", $nid));
     db_query("UPDATE {node_comment_statistics} SET comment_count = 0, last_comment_timestamp = %d, last_comment_name = '', last_comment_uid = %d WHERE nid = %d", $node->created, $node->uid, $nid);
   }
-  cache_clear_all($nid, 'cache_node');
 }
 
 /**
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.875
diff -u -p -r1.875 node.module
--- modules/node/node.module	26 Aug 2007 14:15:51 -0000	1.875
+++ modules/node/node.module	30 Aug 2007 15:20:52 -0000
@@ -444,7 +444,6 @@ function node_type_delete($type) {
  */
 function node_type_update_nodes($old_type, $type) {
   db_query("UPDATE {node} SET type = '%s' WHERE type = '%s'", $type, $old_type);
-  cache_clear_all('*', 'cache_node', TRUE);
   return db_affected_rows();
 }
 
@@ -601,17 +600,6 @@ function node_invoke_nodeapi(&$node, $op
 /**
  * Load a node object from the database.
  *
- * This function provides two levels of caching. The internal cache stores
- * all nodes loaded in this request. Use the $reset argument to invalidate
- * it. The cache API based cache stores all nodes throughout requests,
- * until invalidated with cache_clear_all().
- *
- * If the load operation was cached previously, we load the data from
- * that cache, and no nodeapi load operations are called. That means,
- * that we expect all load operations to return the same data and do
- * not use any conditions on the user, language or anything else,
- * which would limit what is stored in the node_load cache.
- *
  * @param $param
  *   Either the nid of the node or an array of conditions to match against in the database query
  * @param $revision
@@ -633,13 +621,7 @@ function node_load($param = array(), $re
   $arguments = array();
   if (is_numeric($param)) {
     if ($cachable) {
-      if (!isset($nodes[$param])) {
-        if ($cache = cache_get($param, 'cache_node')) {
-          $nodes[$param] = $cache->data;
-        }
-      }
-      // Either the node was statically cached or we loaded from the
-      // cache_node table.
+      // Is the node statically cached?
       if (isset($nodes[$param])) {
         return is_object($nodes[$param]) ? drupal_clone($nodes[$param]) : $nodes[$param];
       }
@@ -685,11 +667,6 @@ function node_load($param = array(), $re
     }
     if ($cachable) {
       $nodes[$node->nid] = is_object($node) ? drupal_clone($node) : $node;
-      // We can only cache when a nid is given, otherwise the conditions are
-      // too dynamic to be cacheable.
-      if (is_numeric($param)) {
-        cache_set($param, $nodes[$node->nid], 'cache_node');
-      }
     }
   }
 
@@ -886,8 +863,6 @@ function node_save(&$node) {
 
   // Clear the page and block caches.
   cache_clear_all();
-  // Clear the node load cache for this node.
-  cache_clear_all($node->nid, 'cache_node');
 }
 
 /**
@@ -1218,7 +1193,6 @@ function node_user($op, &$edit, &$user) 
   if ($op == 'delete') {
     db_query('UPDATE {node} SET uid = 0 WHERE uid = %d', $user->uid);
     db_query('UPDATE {node_revisions} SET uid = 0 WHERE uid = %d', $user->uid);
-    cache_clear_all('*', 'cache_node', TRUE);
   }
 }
 
Index: modules/node/node.schema
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.schema,v
retrieving revision 1.6
diff -u -p -r1.6 node.schema
--- modules/node/node.schema	25 Aug 2007 09:25:48 -0000	1.6
+++ modules/node/node.schema	30 Aug 2007 15:20:52 -0000
@@ -105,7 +105,5 @@ function node_schema() {
     'primary key' => array('type'),
   );
 
-  $schema['cache_node'] = drupal_get_schema_unprocessed('system', 'cache');
-
   return $schema;
 }
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.7
diff -u -p -r1.7 system.admin.inc
--- modules/system/system.admin.inc	29 Aug 2007 18:09:36 -0000	1.7
+++ modules/system/system.admin.inc	30 Aug 2007 15:20:54 -0000
@@ -123,7 +123,7 @@ function system_settings_overview() {
 
 /**
  * Form builder; This function allows selection of the theme to show in administration sections.
- * 
+ *
  * @ingroup forms
  * @see system_settings_form().
  */
@@ -156,7 +156,7 @@ function system_admin_theme_settings() {
 
 /**
  * Menu callback; displays a listing of all themes.
- * 
+ *
  * @ingroup forms
  * @see system_themes_form_submt().
  */
@@ -280,7 +280,7 @@ function system_themes_form_submit($form
 
 /**
  * Form builder; display theme configuration for entire site and individual themes.
- * 
+ *
  * @ingroup forms
  * @see system_theme_settings_submit().
  */
@@ -693,7 +693,7 @@ function system_modules_disable($form, $
  *   elements: the list of dependencies and the list of status
  *   form field values from the previous screen.
  * @ingroup forms
- * @see 
+ * @see
  */
 function system_modules_confirm_form($modules, $storage) {
   $form = array();
@@ -821,7 +821,6 @@ function system_modules_submit($form, &$
     node_types_rebuild();
     menu_rebuild();
     cache_clear_all('schema', 'cache');
-    cache_clear_all('*', 'cache_node', TRUE);
     drupal_set_message(t('The configuration options have been saved.'));
   }
 
@@ -1010,7 +1009,7 @@ function system_modules_uninstall_submit
 
 /**
  * Form builder; The general site information form.
- * 
+ *
  * @ingroup forms
  * @see system_settings_form().
  */
@@ -1068,7 +1067,7 @@ function system_site_information_setting
 
 /**
  * Form builder; Configure error reporting settings.
- * 
+ *
  * @ingroup forms
  * @see system_settings_form().
  */
@@ -1115,7 +1114,7 @@ function system_logging_overview() {
 
 /**
  * Form builder; Configure site performance settings.
- * 
+ *
  * @ingroup forms
  * @see system_settings_form().
  */
@@ -1218,7 +1217,7 @@ function system_performance_settings() {
 
 /**
  * Form builder; Configure the site file handling.
- * 
+ *
  * @ingroup forms
  * @see system_settings_form().
  */
@@ -1255,7 +1254,7 @@ function system_file_system_settings() {
 
 /**
  * Form builder; Configure site image toolkit usage.
- * 
+ *
  * @ingroup forms
  * @see system_settings_form().
  */
@@ -1280,7 +1279,7 @@ function system_image_toolkit_settings()
 
 /**
  * Form builder; Configure how the site handles RSS feeds.
- * 
+ *
  * @ingroup forms
  * @see system_settings_form().
  */
@@ -1306,7 +1305,7 @@ function system_rss_feeds_settings() {
 
 /**
  * Form builder; Configure the site date and time settings.
- * 
+ *
  * @ingroup forms
  * @see system_settings_form().
  * @see system_date_time_settings().
@@ -1476,7 +1475,7 @@ function system_date_time_lookup() {
 
 /**
  * Form builder; Configure the site's maintenance status.
- * 
+ *
  * @ingroup forms
  * @see system_settings_form().
  */
@@ -1502,7 +1501,7 @@ function system_site_maintenance_setting
 
 /**
  * Form builder; Configure Clean URL settings.
- * 
+ *
  * @ingroup forms
  * @see system_settings_form().
  */
@@ -1802,7 +1801,7 @@ function theme_system_admin_by_module($m
 
 /**
  * Theme status report
- * 
+ *
  * @ingroup themeable
  */
 function theme_status_report(&$requirements) {
@@ -1837,7 +1836,7 @@ function theme_status_report(&$requireme
 
 /**
  * Theme call back for the modules form.
- * 
+ *
  * @ingroup themeable
  */
 function theme_system_modules($form) {
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.145
diff -u -p -r1.145 system.install
--- modules/system/system.install	30 Aug 2007 15:13:46 -0000	1.145
+++ modules/system/system.install	30 Aug 2007 15:20:56 -0000
@@ -3698,24 +3698,8 @@ function system_update_6027() {
  * Add the node load cache table.
  */
 function system_update_6028() {
-  $ret = array();
-
-  // Create the cache_node table.
-  $schema['cache_node'] = array(
-    'fields' => array(
-      'cid'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'data'       => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'),
-      'expire'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'created'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'headers'    => array('type' => 'text', 'not null' => FALSE),
-      'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array('expire' => array('expire')),
-    'primary key' => array('cid'),
-  );
-  db_create_table($ret, 'cache_node', $schema['cache_node']);
-
-  return $ret;
+  // Removed node_load cache to discuss it more for Drupal 7.
+  return array();
 }
 
 /**
Index: modules/translation/translation.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/translation/translation.module,v
retrieving revision 1.11
diff -u -p -r1.11 translation.module
--- modules/translation/translation.module	26 Aug 2007 16:06:35 -0000	1.11
+++ modules/translation/translation.module	30 Aug 2007 15:20:57 -0000
@@ -256,7 +256,6 @@ function translation_nodeapi(&$node, $op
           db_query("UPDATE {node} SET tnid = %d, translate = %d WHERE nid = %d", $tnid, 0, $node->translation_source->nid);
         }
         db_query("UPDATE {node} SET tnid = %d, translate = %d WHERE nid = %d", $tnid, 0, $node->nid);
-        translation_clear_node_cache($tnid);
       }
       break;
 
@@ -268,7 +267,6 @@ function translation_nodeapi(&$node, $op
           // This is the source node, asking to mark all translations outdated.
           db_query("UPDATE {node} SET translate = 1 WHERE tnid = %d AND nid != %d", $node->tnid, $node->nid);
         }
-        translation_clear_node_cache($node->tnid);
       }
       break;
 
@@ -297,26 +295,11 @@ function translation_remove_from_set($no
         $new_tnid = db_result(db_query('SELECT nid FROM {node} WHERE tnid = %d ORDER BY translate ASC, nid ASC', $node->tnid));
         db_query('UPDATE {node} SET tnid = %d WHERE tnid = %d', $new_tnid, $node->tnid);
       }
-      translation_clear_node_cache($node->tnid);
     }
   }
 }
 
 /**
- * Clear node_load cache for all nodes in the translation set, so we have
- * the proper translation set information in every node.
- * 
- * @param $tnid
- *   The translation source nid of the translation set, the identifier
- *   of the node used to derive all translations in the set.
- */
-function translation_clear_node_cache($tnid) {
-  foreach (translation_node_get_translations($tnid) as $node) {
-    cache_clear_all($node->nid, 'cache_node');
-  }
-}
-
-/**
  * Get all nodes in a translation set, represented by $tnid.
  *
  * @param $tnid
