/** * This method creates the full qualified file name for a cache entry. This * file name is a combination of the given <em>$key</em>, the cache root * directory and the current entry type, but without the used cache file * extension. * * @param string $key The cache key for the given data. * @return string */ protected function getCacheFileWithoutExtension($key) { if (is_string($this->cacheKey)) { $key = md5($key . $this->cacheKey); } $path = $this->directory->createCacheDirectory($key); return "{$path}/{$key}"; }
/** * testCreateCacheDirectoryAlsoCreatesThePhysicalDirectory * * @return void */ public function testCreateCacheDirectoryAlsoCreatesThePhysicalDirectory() { $dir = new FileCacheDirectory($this->cacheDir); $this->assertFileExists($dir->createCacheDirectory('abcdef0123456789')); }