[drupal-devel] data caching
Carl McDade
carl_mcdade at yahoo.com
Wed Mar 2 11:14:50 UTC 2005
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