private function cleanExpired()
    {
        // 10% chance to clean the database of expired sessions
        if (mt_rand(1, 10) == 1) {
            $expiredTime = $this->now - $this->secondsUntilExpiration;
            $stmt = $this->db->prepare("DELETE FROM {$this->tableName} WHERE time_updated < {$expiredTime}");
            $stmt->execute();
        }
    }
private function cleanExpired()
    {
        // 10% chance to clean the database of expired sessions
        if (mt_rand(1, 10) == 1) {
            $expiredTime = $this->now - $this->secondsUntilExpiration;
            $stmt = $this->db->prepare("DELETE FROM {$this->tableName} WHERE time_updated < {$expiredTime}");
            $stmt->execute();
        }
    }
private function cleanExpired ( ) { // 10% chance to clean the database of expired sessions if ( mt_rand ( 1 , 10 ) == 1 ) { $ expiredTime = $ this -> now - $ this -> secondsUntilExpiration ; $ stmt = $ this -> db -> prepare ( "DELETE FROM {$this->tableName} WHERE time_updated < {$expiredTime}" ) ; $ stmt -> execute ( ) ; } }
Clean Old Sessions

Removes expired sessions from the database
@return void
Clean Old Sessions