Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.3 session存储 SessionInit函数里,需要把new session放到list的头部吗? #1007

Open
moyuanz opened this issue Jul 2, 2018 · 2 comments

Comments

@moyuanz
Copy link

moyuanz commented Jul 2, 2018

func (pder *Provider) SessionInit(sid string) (session.Session, error) {
pder.lock.Lock()
defer pder.lock.Unlock()
v := make(map[interface{}]interface{}, 0)
newsess := &SessionStore{sid: sid, timeAccessed: time.Now(), value: v}
element := pder.list.PushBack(newsess) --> element := pder.list.PushFront(newsess)
pder.sessions[sid] = element
return newsess, nil
}

@xtrj35
Copy link

xtrj35 commented Apr 16, 2024

感觉需要

@Allen-Jaeger
Copy link

Allen-Jaeger commented Apr 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants