/** * {@inheritDoc} */ public function gc($lifetime) { $files = Finder::create()->in($this->path)->files()->ignoreDotFiles(true)->date('<= now - ' . $lifetime . ' seconds'); foreach ($files as $file) { $this->files->delete($file->getRealPath()); } }
/** * Remove an item from the cache. * * @param string $key * @return void */ public function forget($key) { $file = $this->path($key); if ($this->files->exists($file)) { $this->files->delete($file); } }