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

Add Redis store implementation #202

Merged
merged 1 commit into from Oct 6, 2019
Merged

Conversation

rbcervilla
Copy link
Contributor

Added Redis store implementation

  1. Redis store implementation with go-redis as Redis client. This enables use Redis on single mode, Sentinel and Cluster.

@elithrar
Copy link
Contributor

I took a quick look over your store implementation, and a couple of pieces of feedback:

@elithrar elithrar self-assigned this Sep 18, 2019
@elithrar elithrar self-requested a review September 18, 2019 17:21
@rbcervilla
Copy link
Contributor Author

  • Make the README example a self-contained, runnable example

I have included a runnable example

  • You should provide an option to set a store-wide MaxAge instead of defaulting to 86400*30 (or requiring a per-session override)

It's provided with method Options. Example:

    store.Options(sessions.Options{
        Path:   "/path",
        Domain: "example.com",
        MaxAge: 86400 * 60,
    })
  • Make sure to apply the MaxAge to all Codecs - see #48 (comment)

This is not needed because the implementation doesn't use securecookie.

@rbcervilla
Copy link
Contributor Author

@elithrar Do you think it is possible to add the implementation to the documentation?

@elithrar
Copy link
Contributor

elithrar commented Oct 6, 2019

Thanks for this!

@elithrar elithrar merged commit 400b592 into gorilla:master Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants