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:
parent
742c432fd1
commit
9fc4cd8958
@ -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() })
|
||||
|
Loading…
Reference in New Issue
Block a user