public function __construct($cache_dir)
{
$config = new Configuration();
// Prevent trying to write to system temp dir in case of open_basedir
// restrictions being in effect
$ini_wrapper = new IniGetWrapper();
$filesystem = new filesystem();
$tmp_dir = function_exists('sys_get_temp_dir') ? sys_get_temp_dir() : '';
if (empty($tmp_dir) || $ini_wrapper->getString('open_basedir') && (!$filesystem->exists($tmp_dir) || !$filesystem->is_writable($tmp_dir))) {
$config->setProxiesTargetDir($cache_dir);
}
$config->setGeneratorStrategy(new EvaluatingGeneratorStrategy());
$this->factory = new LazyLoadingValueHolderFactory($config);
}