Ejemplo n.º 1
0
 /**
  * Remove session records older than a given expiration.
  *
  * @param  int   $expiration
  * @return void
  */
 public function sweep($expiration)
 {
     foreach ($this->files->files($this->path) as $file) {
         // If the last modification timestamp is less than the given UNIX expiration
         // timestamp, it indicates the session has expired and should be removed
         // off of the disks so we don't use space for files that have expired.
         if ($this->files->lastModified($file) < $expiration) {
             $this->files->delete($file);
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * Remove an item from the cache.
  *
  * @param  string  $key
  * @return void
  */
 protected function removeItem($key)
 {
     $this->files->delete($this->path($key));
 }