/**
  * {@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());
     }
 }
Esempio n. 2
0
 /**
  * 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);
     }
 }
Esempio n. 3
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $this->cache->flush();
     $this->files->delete($this->nova['config']['app.manifest'] . DS . 'services.json');
     $this->info('Application cache cleared!');
 }