[development] Object Caching in DRUPAL-7?

larry at garfieldtech.com larry at garfieldtech.com
Thu Feb 26 17:00:43 UTC 2009


Nabil Alsharif wrote:
> This is my first post on this list so pleas enlighten the ignorant.
>
> IMO having a hook_nodeapi_load and hook_nodeapi_post_load could get a
> little confusing and is redundant. I agree with Josh in that there
> should be a $node->cacheable field.
>
> The question is where does drupal check this field? For example I could
> create a cache friendly content type and set the nodes of that type to
> cacheable in (say hook_load). Another module could come along and alter
> that node (hook_nodeapi_*) in a way that isn't cache friendly and
> designate to as non-cacheable, what then?


You've just answered your own question. :-)  Your second paragraph is 
the very reason why there's a two step build process (cacheable and not) 
rather than a single kill-switch flag.

(At least that's how I interpret it; I wasn't involved in the original 
patch.)

--Larry Garfield


More information about the development mailing list