Beispiel #1
0
 /**
  * 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}";
 }
Beispiel #2
0
 /**
  * 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'));
 }
Beispiel #3
0
 /**
  * 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}";
 }