示例#1
0
 /**
  * Test if an item exists.
  *
  * @param  string $cacheId
  *
  * @return bool
  */
 public function hasItem($cacheId)
 {
     $path = $this->keyPath($cacheId);
     return FileUtils::exists($path);
 }
示例#2
0
 /**
  * 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);
 }