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