function _views_fetch_plugin_data

3.x cache.inc _views_fetch_plugin_data($type = NULL, $plugin = NULL, $reset = FALSE)
2.x cache.inc _views_fetch_plugin_data($type = NULL, $plugin = NULL)

Fetch the plugin data from cache.

1 call to _views_fetch_plugin_data()
views_fetch_plugin_data in ./views.module
Fetch the plugin data from cache.

File

includes/cache.inc, line 127
Load Views' data so that it knows what is available to build queries from.

Code

function _views_fetch_plugin_data($type = NULL, $plugin = NULL, $reset = FALSE) {
  static $cache = NULL;
  if (!isset($cache) || $reset) {
    $start = microtime(TRUE);
    views_include('plugins');
    views_include_handlers();

    $cache = views_discover_plugins();

  }

  if (!$type && !$plugin) {
    return $cache;
  }
  elseif (!$plugin) {
    // Not in the if above so the else below won't run
    if (isset($cache[$type])) {
      return $cache[$type];
    }
  }
  elseif (isset($cache[$type][$plugin])) {
    return $cache[$type][$plugin];
  }

  // Return an empty array if there is no match.
  return array();
}