If you look at node_load on api.drupal.org you see that caching is only used, when you parse $nid as parameter not as array('nid' => $nid).
Therefore here is a patch which solves this.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | node_load-caching.patch | 1.51 KB | dawehner |
| node_load_caching.patch | 0 bytes | dawehner |
Comments
Comment #1
dawehnerHere is the link.
http://api.drupal.org/api/function/node_load/6
Comment #2
dwwThanks for the report, but that's an empty patch.
Comment #3
dww(more accurate title)
Comment #4
dawehnerMh stange, here is the right patch
Comment #5
dwwLooks great, thanks. I grepped to ensure those were the only spots that have this bug. Reviewed and committed to HEAD and DRUPAL-6--1. This will be out in RC5 (any day now).
Thanks again!
-Derek
Comment #6
dawehnerShouldn't be there documentaion anywhere how to use node_load, perhaps also in the api docs for d5 and d6.
Comment #7
dww@dereine: Sure. Feel free to open up a core documentation bug to patch the PHPDoc for node_load() to mention that using a numeric $param is the only way to get a cached copy of the node... I'd be happy to review/RTBC your patch if you add a link to it here. ;)