mirror of
https://github.com/kataras/iris.git
synced 2026-01-06 03:27:27 +00:00
Sessions are now in full sync with the registered database, on acquire(init), set, get, delete, clear, visit, len, release(destroy) as requested by almost everyone. https://github.com/kataras/iris/issues/969
Former-commit-id: 49fcdb93106a78f0a24ad3fb4d8725e35e98451a
This commit is contained in:
@@ -107,7 +107,7 @@ func (s *Sessions) Start(ctx context.Context) *Session {
|
||||
sid := s.config.SessionIDGenerator()
|
||||
|
||||
sess := s.provider.Init(sid, s.config.Expires)
|
||||
sess.isNew = sess.values.Len() == 0
|
||||
sess.isNew = s.provider.db.Len(sid) == 0
|
||||
|
||||
s.updateCookie(ctx, sid, s.config.Expires)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user