public function setConfig(array $config, $file = null)
    {
        $file = !empty($file) ? $file : $this->fileCache;
        if (file_exists($file)) {
            unlink($file);
        }
        (new PhpArray())
                ->setUseBracketArraySyntax(true)
                ->toFile($file, $config);
    }