コード例 #1
0
ファイル: File.php プロジェクト: gunnilx/WurflCache
 /**
  * Test if an item exists.
  *
  * @param  string $cacheId
  *
  * @return bool
  */
 public function hasItem($cacheId)
 {
     $path = $this->keyPath($cacheId);
     return FileUtils::exists($path);
 }
コード例 #2
0
ファイル: File.php プロジェクト: mimmi20/wurflcache
 /**
  * Remove an item.
  *
  * @param string $cacheId
  *
  * @return bool
  */
 public function removeItem($cacheId)
 {
     $path = $this->keyPath($cacheId);
     if (!FileUtils::exists($path)) {
         return true;
     }
     return unlink($path);
 }