9fc4cd89 by astaxie

#238 add GetProvider

1 parent 742c432f
...@@ -158,6 +158,11 @@ func (manager *Manager) SessionDestroy(w http.ResponseWriter, r *http.Request) { ...@@ -158,6 +158,11 @@ func (manager *Manager) SessionDestroy(w http.ResponseWriter, r *http.Request) {
158 } 158 }
159 } 159 }
160 160
161 func (manager *Manager) GetProvider(sid string) (sessions SessionStore, err error) {
162 sessions, err = manager.provider.SessionRead(sid)
163 return
164 }
165
161 func (manager *Manager) GC() { 166 func (manager *Manager) GC() {
162 manager.provider.SessionGC() 167 manager.provider.SessionGC()
163 time.AfterFunc(time.Duration(manager.maxlifetime)*time.Second, func() { manager.GC() }) 168 time.AfterFunc(time.Duration(manager.maxlifetime)*time.Second, func() { manager.GC() })
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!