Exemplo n.º 1
0
 /**
  * Remove the garbage from the session if necessary.
  *
  * @param  \Illuminate\Session\SessionInterface  $session
  * @return void
  */
 protected function collectGarbage(SessionInterface $session)
 {
     $config = $this->manager->getSessionConfig();
     // Here we will see if this request hits the garbage collection lottery by hitting
     // the odds needed to perform garbage collection on any given request. If we do
     // hit it, we'll call this handler to let it delete all the expired sessions.
     if ($this->configHitsLottery($config)) {
         $session->getHandler()->gc($this->getSessionLifetimeInSeconds());
     }
 }
 protected function collectGarbage(SessionInterface $session)
 {
     $config = $this->manager->getSessionConfig();
     if ($this->configHitsLottery($config)) {
         $session->getHandler()->gc($this->getSessionLifetimeInSeconds());
     }
 }