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

Version 1.7.14 fixed can not set redis maxIdle & maxActive when use redis session, fix for issue #236 #237

Merged
merged 1 commit into from
Dec 19, 2020

Conversation

devfeel
Copy link
Owner

@devfeel devfeel commented Dec 19, 2020

sessionConf := session.NewDefaultRedisConfig("redis://xx.xx.xx.xx:6379/0")
sessionConf.BackupServerUrl = "redis://xx.xx.xx.xx:6379/0"
sessionConf.CookieName = "dotweb-example.SessionID"
sessionConf.MaxIdle = 20
sessionConf.MaxActive = 100
  • 2020-12-19 21:00 at ShangHai

* fix: fixed can not set redis maxIdle & maxActive when use redis session, fix for issue #236
* refactor: add StoreConfig.MaxIdle & StoreConfig.MaxActive set redis maxIdle & maxActive
* refactor: add redisutil.GetDefaultRedisClient to returns the RedisClient of specified address
* refactor: update redisutil.GetRedisClient returns the RedisClient of specified address & maxIdle & maxActive
* opt: set defaultMaxIdle=10, defaultMaxActive=50 when use default redis config
* How to set redis maxIdle & maxActive when use redis session:
~~~ go
sessionConf := session.NewDefaultRedisConfig("redis://xx.xx.xx.xx:6379/0")
sessionConf.BackupServerUrl = "redis://xx.xx.xx.xx:6379/0"
sessionConf.CookieName = "dotweb-example.SessionID"
sessionConf.MaxIdle = 20
sessionConf.MaxActive = 100
~~~
* 2020-12-19 21:00 at ShangHai
@devfeel devfeel merged commit 34470fa into master Dec 19, 2020
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

Successfully merging this pull request may close these issues.

1 participant