? node_load_caching_flag-D6.patch
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.947.2.19
diff -u -p -r1.947.2.19 node.module
--- modules/node/node.module	23 Sep 2009 09:09:30 -0000	1.947.2.19
+++ modules/node/node.module	19 Oct 2009 19:09:23 -0000
@@ -690,22 +690,24 @@ function node_invoke_nodeapi(&$node, $op
  *   Which numbered revision to load. Defaults to the current version.
  * @param $reset
  *   Whether to reset the internal node_load cache.
+ * @param $cache
+ *   Whether or not this node should be cached after loading. Defaults to TRUE.
  *
  * @return
  *   A fully-populated node object.
  */
-function node_load($param = array(), $revision = NULL, $reset = NULL) {
+function node_load($param = array(), $revision = NULL, $reset = NULL, $cache = TRUE) {
   static $nodes = array();
 
   if ($reset) {
     $nodes = array();
   }
 
-  $cachable = ($revision == NULL);
+  $cachable = ($revision == NULL && $cache);
   $arguments = array();
   if (is_numeric($param)) {
-    if ($cachable) {
-      // Is the node statically cached?
+    if ($revision == NULL) {
+      // If we aren't looking for a revision, try to fetch from cache.
       if (isset($nodes[$param])) {
         return is_object($nodes[$param]) ? drupal_clone($nodes[$param]) : $nodes[$param];
       }
