function _views_fetch_plugin_data
Same name in other branches
- 7.x-3.x includes/cache.inc \_views_fetch_plugin_data()
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 65
Code
function _views_fetch_plugin_data($type = NULL, $plugin = NULL, $reset = FALSE) {
static $cache = NULL;
if (!isset($cache) || $reset) {
$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();
}