sitePrefix = Settings::getApcuPrefix('apcu_backend', $root, $site_path); $this->checksumProvider = $checksum_provider; if (version_compare(phpversion('apcu'), '5.0.0', '>=')) { $this->backendClass = 'Drupal\Core\Cache\ApcuBackend'; } else { $this->backendClass = 'Drupal\Core\Cache\Apcu4Backend'; } } /** * Gets ApcuBackend for the specified cache bin. * * @param $bin * The cache bin for which the object is created. * * @return \Drupal\Core\Cache\ApcuBackend * The cache backend object for the specified cache bin. */ public function get($bin) { return new $this->backendClass($bin, $this->sitePrefix, $this->checksumProvider); } }