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

Detect expired entries on read #41

Merged
merged 5 commits into from Nov 18, 2020
Merged

Conversation

6543
Copy link
Contributor

@6543 6543 commented Nov 13, 2020

When reading sessions that should be expired expire them

Also fixes memory Init()

zeripath and others added 2 commits November 13, 2020 04:39
When reading sessions that should be expired expire them

Also fixes memory Init() to make the Gitea copy of the memory provider
unnecessary.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Reviewed-on: https://gitea.com/macaron/session/pulls/11
Reviewed-by: 6543 <6543@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
@6543
Copy link
Contributor Author

6543 commented Nov 13, 2020

@unknwon the expire enhancements updated :)

Copy link
Contributor

@unknwon unknwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Can you add comments on every new addition about rationale? It is not clear to me what has been improved or fixed.

file.go Outdated Show resolved Hide resolved
memory.go Show resolved Hide resolved
file.go Outdated Show resolved Hide resolved
file.go Outdated Show resolved Hide resolved
file.go Outdated Show resolved Hide resolved
6543 and others added 2 commits November 14, 2020 13:47
Co-authored-by: zeripath <art27@cantab.net>
@6543
Copy link
Contributor Author

6543 commented Nov 14, 2020

@unknwon does #41 (comment) explain it :) ?

memory.go Outdated Show resolved Hide resolved
@unknwon
Copy link
Contributor

unknwon commented Nov 15, 2020

Thanks for the follow up! One last minor issue.

memory.go Outdated Show resolved Hide resolved
@6543
Copy link
Contributor Author

6543 commented Nov 17, 2020

@unknwon you are right, changed :)

Copy link
Contributor

@unknwon unknwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@unknwon unknwon changed the title Expire on read Detect expired entries on read Nov 18, 2020
@unknwon unknwon merged commit dd240b0 into go-macaron:master Nov 18, 2020
@unknwon
Copy link
Contributor

unknwon commented Nov 18, 2020

https://github.com/go-macaron/session/releases/tag/v1.0.1 has been published for this merge.

@6543 6543 deleted the expire-on-read branch November 18, 2020 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants