1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 04:30:54 +00:00
Beego/middleware/session.go

15 lines
312 B
Go
Raw Normal View History

2013-09-09 16:00:11 +00:00
package middleware
import (
"github.com/astaxie/beego/session"
)
var (
GlobalSessions *session.Manager
)
func StartSession(provideName, cookieName string, maxlifetime int64, savePath string) {
GlobalSessions, _ = session.NewManager(provideName, cookieName, maxlifetime, savePath)
go GlobalSessions.GC()
}