function apdqc_views_api in Asynchronous Prefetch Database Query Cache 7
Implements hook_views_api().
File
- ./
apdqc.module, line 1065 - Asynchronous Prefetch Database Query Cache module.
Code
function apdqc_views_api() {
if (!function_exists('apdqc_run_prefetch_array') || !function_exists('apdqc_escape_string')) {
return;
}
if (apdqc_get_bin_class_name('cache_views') !== 'APDQCache') {
return;
}
static $run_once;
if (!isset($run_once)) {
$run_once = TRUE;
$lang_shorthand = apdqc_get_lang();
$table_keys_cache_prefetch = array();
$table_keys_cache_prefetch['cache_views'][] = 'entity_base_tables:' . $lang_shorthand;
$table_keys_cache_prefetch['cache_views'][] = 'views_data:' . $lang_shorthand;
$table_keys_cache_prefetch['cache_views'][] = 'views_data:views:' . $lang_shorthand;
$table_keys_cache_prefetch['cache_views'][] = 'views_content_all:' . $lang_shorthand;
// Prefetch cache.
apdqc_run_prefetch_array($table_keys_cache_prefetch);
}
}