function apdqc_get_bin_class_name in Asynchronous Prefetch Database Query Cache 7
Gets the cache class name for a cache bin.
Parameters
string $bin: The cache bin for which the cache class name should be returned.
Return value
string The cache class name used for this specified bin.
See also
DrupalCacheInterface()
17 calls to apdqc_get_bin_class_name()
- ApdqcPrefetchDrupalDefaultEntityController::__call in ./
apdqc.module - Magic method; forward all calls to the original base class.
- apdqc_async_data in ./
apdqc.mysql.inc - Used to get & parse async cached data.
- apdqc_boot in ./
apdqc.module - Implements hook_boot().
- apdqc_ctools_plugin_pre_alter in ./
apdqc.module - Implements hook_ctools_plugin_pre_alter().
- apdqc_entity_load in ./
apdqc.module - Implements hook_entity_load().
File
- ./
apdqc.cache.inc, line 212 - Extends Drupal's default database cache so async queries happen.
Code
function apdqc_get_bin_class_name($bin) {
// We do not use drupal_static() here because we do not want to change the
// storage of a cache bin mid-request.
static $cache_objects;
if (!isset($cache_objects[$bin])) {
$class = variable_get('cache_class_' . $bin);
if (!isset($class)) {
$class = variable_get('cache_default_class', 'DrupalDatabaseCache');
}
$cache_objects[$bin] = $class;
}
return $cache_objects[$bin];
}