'Save session data.'

def save(self):

    try:
        if self.loaded:
            t = datetime.timedelta(seconds=(self.timeout * 60))
            expiration_time = (self.now() + t)
            if self.debug:
                cherrypy.log(('Saving    session    %r    with    expiry    %s' % (self.id, expiration_time)), 'TOOLS.SESSIONS')
            self._save(expiration_time)
        elif self.debug:
            cherrypy.log(('Skipping    save    of    session    %r    (no    session    loaded).' % self.id), 'TOOLS.SESSIONS')
    finally:
        if self.locked:
            self.release_lock()
            if self.debug:
                cherrypy.log('Lock    released    after    save.', 'TOOLS.SESSIONS')
