parameterProvider = $parameterProvider; $this->smartFileSystem = $smartFileSystem; } public function create() : Cache { $cacheDirectory = $this->parameterProvider->provideStringParameter(Option::CACHE_DIR); // ensure cache directory exists if (!$this->smartFileSystem->exists($cacheDirectory)) { $this->smartFileSystem->mkdir($cacheDirectory); } $fileStorage = new FileStorage($cacheDirectory); // namespace is unique per project return new Cache($fileStorage, \getcwd()); } }