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

Defer session instantiation to first set #576

Closed
pushrax opened this issue Apr 12, 2014 · 1 comment
Closed

Defer session instantiation to first set #576

pushrax opened this issue Apr 12, 2014 · 1 comment
Assignees
Labels
status-planning Active planning underway
Milestone

Comments

@pushrax
Copy link
Contributor

pushrax commented Apr 12, 2014

@twistor brought this up in #323 and I agree – sessions shouldn't be created until necessary.

@brendensoares
Copy link
Member

https://github.com/revel/revel/blob/master/session.go#L155
https://github.com/revel/revel/blob/master/session.go#L147

So, how about this:

if len(c.Session) > 0 {
    c.SetCookie(c.Session.cookie())
}

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

No branches or pull requests

2 participants