'Generate a new Session instance, and store it for future reference.'

def makeSession(self):

    uid = self._mkuid()
    session = self.sessions[uid] = self.sessionFactory(self, uid)
    session.startCheckingExpiration()
    return session
