1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 10:10:49 +00:00

#238 add GetProvider

This commit is contained in:
astaxie 2013-10-28 23:25:30 +08:00
parent 742c432fd1
commit 9fc4cd8958

View File

@ -158,6 +158,11 @@ func (manager *Manager) SessionDestroy(w http.ResponseWriter, r *http.Request) {
}
}
func (manager *Manager) GetProvider(sid string) (sessions SessionStore, err error) {
sessions, err = manager.provider.SessionRead(sid)
return
}
func (manager *Manager) GC() {
manager.provider.SessionGC()
time.AfterFunc(time.Duration(manager.maxlifetime)*time.Second, func() { manager.GC() })