Index: views.module =================================================================== RCS file: /cvs/drupal/contributions/modules/views/views.module,v retrieving revision 1.341.4.36 diff -u -r1.341.4.36 views.module --- views.module 14 Oct 2010 20:04:09 -0000 1.341.4.36 +++ views.module 15 Oct 2010 19:19:23 -0000 @@ -589,8 +589,8 @@ /** * Load views files on behalf of modules. */ -function views_module_include($file) { - foreach (views_get_module_apis() as $module => $info) { +function views_module_include($file, $reset = FALSE) { + foreach (views_get_module_apis($reset) as $module => $info) { if (file_exists(DRUPAL_ROOT . "/$info[path]/$module.$file")) { require_once DRUPAL_ROOT . "/$info[path]/$module.$file"; } @@ -600,9 +600,9 @@ /** * Get a list of modules that support the current views API. */ -function views_get_module_apis() { +function views_get_module_apis($reset = FALSE) { static $cache = NULL; - if (!isset($cache)) { + if (!isset($cache) || $reset) { $cache = array(); foreach (module_implements('views_api') as $module) { $info = module_invoke($module, 'views_api'); @@ -654,10 +654,10 @@ /** * Load views files on behalf of modules. */ -function views_include_handlers() { +function views_include_handlers($reset = FALSE) { static $finished = FALSE; // Ensure this only gets run once. - if ($finished) { + if ($finished && !$reset) { return; } @@ -672,19 +672,19 @@ /** * Load default views files on behalf of modules. */ -function views_include_default_views() { +function views_include_default_views($reset = FALSE) { static $finished = FALSE; // Ensure this only gets run once. - if ($finished) { + if ($finished && !$reset) { return; } // Default views hooks may be in the normal handler file, // or in a separate views_default file at the discretion of // the module author. - views_include_handlers(); + views_include_handlers($reset); - _views_include_default_views(); + _views_include_default_views($reset); $finished = TRUE; } @@ -743,9 +743,9 @@ /** * Fetch Views' data from the cache */ -function views_fetch_data($table = NULL) { +function views_fetch_data($table = NULL, $reset = FALSE) { views_include('cache'); - return _views_fetch_data($table); + return _views_fetch_data($table, $reset); } // ----------------------------------------------------------------------- @@ -754,17 +754,17 @@ /** * Fetch the plugin data from cache. */ -function views_fetch_plugin_data($type = NULL, $plugin = NULL) { +function views_fetch_plugin_data($type = NULL, $plugin = NULL, $reset = FALSE) { views_include('cache'); - return _views_fetch_plugin_data($type, $plugin); + return _views_fetch_plugin_data($type, $plugin, $reset); } /** * Get a handler for a plugin */ -function views_get_plugin($type, $plugin) { +function views_get_plugin($type, $plugin, $reset = FALSE) { views_include('handlers'); - $definition = views_fetch_plugin_data($type, $plugin); + $definition = views_fetch_plugin_data($type, $plugin, $reset); if (!empty($definition)) { return _views_create_handler($definition, $type); } Index: includes/cache.inc =================================================================== RCS file: /cvs/drupal/contributions/modules/views/includes/cache.inc,v retrieving revision 1.25.4.6 diff -u -r1.25.4.6 cache.inc --- includes/cache.inc 12 Mar 2010 01:51:39 -0000 1.25.4.6 +++ includes/cache.inc 15 Oct 2010 19:19:23 -0000 @@ -24,9 +24,9 @@ /** * Fetch Views' data from the cache */ -function _views_fetch_data($table = NULL) { +function _views_fetch_data($table = NULL, $reset = FALSE) { static $cache = NULL; - if (!isset($cache)) { + if (!isset($cache) || $reset) { $start = microtime(TRUE); // NOTE: This happens whether we retrieve them from cache or otherwise. @@ -61,9 +61,9 @@ /** * Fetch the plugin data from cache. */ -function _views_fetch_plugin_data($type = NULL, $plugin = NULL) { +function _views_fetch_plugin_data($type = NULL, $plugin = NULL, $reset = FALSE) { static $cache = NULL; - if (!isset($cache)) { + if (!isset($cache) || $reset) { $start = microtime(TRUE); views_include('plugins'); views_include_handlers();