public function __construct($settings = [])
{
if (!isset($settings['cacheDir'])) {
throw new ConfigurationException("FileBase adapters is required 'cacheDir' option");
}
$cacheDir = $settings['cacheDir'];
if (!is_dir($cacheDir)) {
throw new ConfigurationException("'{$cacheDir}' is not directory");
}
if (!is_writable($cacheDir)) {
throw new ConfigurationException("Directory '{$cacheDir}' is not writable");
}
// get rid of trailing slash
$this->cacheDir = realpath($cacheDir);
parent::__construct($settings);
}