Hi

In some cases in my app, I'd need to load data directly from db instead of using cache, but I don't want to mess with cache_content table as in the rest of the app it works just fine.

node_load function has a $reset parameter but content_load always look for the cached content.

Is there any way of loading a non-cached version of the node somehow?

Thanks!

Comments

pcambra’s picture

(Autoresponse) I have found two workarounds:

One) Just before loading the node with node_load, I have issued this code:

    $cid = 'content:'. $node->nid .':'. $data->vid;
    cache_clear_all($cid, content_cache_tablename());

Two) Using hook_nodeapi with $op 'load', then query the current value of the field(s) I need and returning it as an array

Anyway It would be pretty useful adding a $cache to the content_load somehow, but I don't know if this makes sense with fields in core for d7.