/** * 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 * @group pdepend * @group pdepend::util * @group pdepend::util::cache * @group pdepend::util::cache::file * @group unittest */ public function testCreateCacheDirectoryAlsoCreatesThePhysicalDirectory() { $dir = new PHP_Depend_Util_Cache_Driver_File_Directory($this->cacheDir); self::assertFileExists($dir->createCacheDirectory('abcdef0123456789')); }
/** * 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) { $path = $this->directory->createCacheDirectory($key); return "{$path}/{$key}"; }