1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-25 21:05:56 +00:00

Version 3.0.0-beta cleaned

This commit is contained in:
Makis Maropoulos
2016-05-30 17:08:09 +03:00
commit c26668a489
114 changed files with 14552 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package memory
import (
"time"
"github.com/kataras/iris/sessions"
"github.com/kataras/iris/sessions/store"
)
func init() {
register()
}
var (
Provider = sessions.NewProvider("memory")
)
// register registers itself (the new provider with its memory store) to the sessions providers
// must runs only once
func register() {
// the actual work is here.
Provider.NewStore = func(sessionId string, cookieLifeDuration time.Duration) store.IStore {
//println("memory.go:49-> requesting new memory store with sessionid: " + sessionId)
return &Store{sid: sessionId, lastAccessedTime: time.Now(), values: make(map[interface{}]interface{}, 0)}
}
sessions.Register(Provider)
}