[drupal-devel] data caching

Carl McDade carl_mcdade at yahoo.com
Wed Mar 2 12:03:16 UTC 2005

That code is from an old drupaldocs.org download.

I was thinking that the call for all functions could be cached. The
cache would be the usable function calls. If and when a function name
contains 'extend' then it would overwrite the original. Example
$function_hook is loaded to cache, if and when $function_extend_hook is
found then its name would be changed to $function_hook and it would
overwrite any previous version.

This way if you wanted to use and extend a core or contrib function in a
module it could be done without actually going in and coding the
extended functionallity.


The example uses a database function call but I believe any type can be

Carl McDade

Negyesi Karoly wrote:
>> this is just notes code not real or perfect.
> No problem, I guess with that.
>> <?php
>> function module_invoke($module, $hook, $a1 = NULL, $a2 = NULL, $a3 =
>> NULL, $a4 = NULL) {
> Where do you see this code in HEAD? It's "long" gone <smirks>.
> In English words, you are proposing that the return value of functions 
> that 
> are invoked by module_invoke shall be recorded into the cache? (Still 
> don't 
> understand that extended part) I fail to see what good will you achive 
> by 
> this. Pages' cache are OK, and of the few functions that needs cache, 
> have 
> their own ways of cache.
> Regards
> NK

More information about the drupal-devel mailing list