Example #1
0
func (m *SessionHandler) commit(session *sessions.Session) {
	if session.IsExpired() {
		m.Store.Remove(session.Id)
	} else {
		m.Store.Store(session)
	}
}
Example #2
0
func (m *SessionHandler) Finalize(session *sessions.Session, resp *httpapp.Response) {
	m.commit(session)
	if session.IsExpired() {
		m.expireSession(session, resp)
	} else {
		m.saveState(session, resp)
	}
}