function DrupalAPCCache::__construct in APC - Alternative PHP Cache 7
File
- ./drupal_apc_cache.inc, line 85
- This integrates the drupal APC cache backend.
Class
- DrupalAPCCache
- APC cache implementation.
Code
function __construct($bin) {
$this->bin = $bin;
$this->drush = drupal_is_cli() && function_exists('drush_log');
$prefix = self::getPrefixSettingForBin($this->bin);
if (empty($prefix) && isset($_SERVER['HTTP_HOST'])) {
$prefix = $_SERVER['HTTP_HOST'] . '::';
}
else {
$prefix = $prefix . '::';
}
if ($test_prefix = drupal_valid_test_ua()) {
$prefix = $test_prefix . '::' . $prefix;
}
else {
if (isset($GLOBALS['drupal_test_info'])) {
$prefix = $GLOBALS['drupal_test_info']['test_run_id'] . '::' . $prefix;
}
}
$this->prefix = $prefix;
}