function _views_fetch_plugin_data
3.x cache.inc | _views_fetch_plugin_data($type = NULL, $plugin = NULL, |
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
Code
function _views_fetch_plugin_data($type = NULL, $plugin = NULL) {
static $cache = NULL;
if (!isset($cache)) {
$start = views_microtime();
views_include_handlers();
$cache = views_discover_plugins();
vpr('Views plugins build time: ' . (views_microtime() - $start) * 1000 . ' ms');
}
if (!$type && !$plugin) {
return $cache;
}
else if (!$plugin) {
// Not in the if above so the else below won't run
if (isset($cache[$type])) {
return $cache[$type];
}
}
else if (isset($cache[$type][$plugin])) {
return $cache[$type][$plugin];
}
// Return an empty array if there is no match.
return array();
}