コード例 #1
0
 /**
  * @param int|string $sessionId
  *
  * @return bool
  */
 public function destroy($sessionId)
 {
     $key = $this->keyPrefix . $sessionId;
     $startTime = microtime(true);
     $this->connection->del($key);
     $this->newRelicApi->addCustomMetric(self::METRIC_SESSION_DELETE_TIME, microtime(true) - $startTime);
     return true;
 }
コード例 #2
0
 /**
  * @param int|string $sessionId
  *
  * @return bool
  */
 public function destroy($sessionId)
 {
     $key = $this->keyPrefix . $sessionId;
     $file = $this->savePath . DIRECTORY_SEPARATOR . $key;
     if (file_exists($file)) {
         $startTime = microtime(true);
         unlink($file);
         $this->newRelicApi->addCustomMetric(self::METRIC_SESSION_DELETE_TIME, microtime(true) - $startTime);
     }
     return true;
 }