CacheFactoryDefault.php in Drupal driver for SQL Server and SQL Azure 8.2
File
drivers/lib/Drupal/Driver/Database/sqlsrv/Component/CacheFactoryDefault.php
View source
<?php
namespace Drupal\Driver\Database\sqlsrv\Component;
class CacheFactoryDefault implements CacheFactoryInterface {
public function __construct($prefix) {
$this->prefix = $prefix;
}
protected $prefix;
protected $binaries = [];
public function get($bin) {
$name = $this->prefix . ':' . $bin;
if (!isset($this->binaries[$name])) {
if (extension_loaded('wincache')) {
$this->binaries[$name] = new CacheWincache($name);
}
elseif (function_exists("apcu_get")) {
$this->binaries[$name] = new CacheApcu($name);
}
else {
$this->binaries[$name] = new CacheStub($name);
}
}
return $this->binaries[$name];
}
}