[drupal-devel] data caching

Moshe Weitzman weitzman at tejasa.com
Wed Mar 2 12:05:03 UTC 2005


folks - please do not double post to the forums *and* the mailing list. 
it unnecessarily complicates life for researchers  who search  the 
archives for answers. further, it an inconsiderate grab for attention, 
IMO.

replies to this 'data caching' post are welcome at 
http://drupal.org/node/15943#comment-30468

On Mar 2, 2005, at 6:14 AM, Carl McDade wrote:

>
>
> This has been bugging in my sleep of late because I keep having to go
> into the core modules
>
> to change things. But why doesn't module_invoke_ all or Drupal use data
> caching?
>
> This would allow modules to override functions by writing to the cache.
>
> When checking for the hook there could be an extra maintenance string
> added.
>
> this is just notes code not real or perfect.
>
> <?php
> function module_invoke($module, $hook, $a1 = NULL, $a2 = NULL, $a3 =
> NULL, $a4 = NULL) {
>   $function = $module .'_'. $hook;
>   if (function_exists(${$function.'_extended'})) {
>      return addToCache($function_extended($a1, $a2, $a3, $a4));
> } else {
>     return addToCache($function($a1, $a2, $a3, $a4));
>   }
> }
> ?>
>
> Carl McDade




More information about the drupal-devel mailing list