1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-04 10:47:20 +00:00
Former-commit-id: f2f277cd5cbe781ce596adc7840a1b1bc3b3bfc6
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-06-19 05:54:21 +03:00
parent 9724592697
commit 3f98b39632
6 changed files with 61 additions and 31 deletions

View File

@@ -83,6 +83,13 @@ func (s *Sessions) Start(ctx context.Context, cookieOptions ...context.CookieOpt
sid := s.config.SessionIDGenerator(ctx)
sess := s.provider.Init(s, sid, s.config.Expires)
// n := s.provider.db.Len(sid)
// fmt.Printf("db.Len(%s) = %d\n", sid, n)
// if n > 0 {
// s.provider.db.Visit(sid, func(key string, value interface{}) {
// fmt.Printf("%s=%s\n", key, value)
// })
// }
sess.isNew = s.provider.db.Len(sid) == 0
s.updateCookie(ctx, sid, s.config.Expires, cookieOptions...)