I just saw http://cvs.drupal.org/viewcvs/drupal/contributions/modules/nodeprofile/n... and wanted to point out that node_load actually implements basically the same thing. By default node_load will cache, though you can tell it not to cache if you want...

I think you can safely revert that patch. I tried searching for a related issue (since the nid wasn't in the commit message) but didn't find one that would explain why you'd want to duplicate node_load's functionality.

Comments

fago’s picture

Status: Active » Closed (won't fix)

imo it's no duplicate. if you look at node_load() it does only cache if the $nid param is used - if one uses array('type' => $type, 'uid' => $uid) then node_load is generating a query every time one calls it this way.

greggles’s picture

Aha - I see.

Well, it could be useful to integrate your change into the default node_load so that all of drupal can benefit from it.

Of course that's up to you so I will leave this as "won't fix".