-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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 cache store for distributed deployment #1751
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @luoxmc ,可以提供一个详细的测试流程么?
你可以引入一个 embedded-redis 并且scope设置为 testOnly,然后编写一个 RedisCacheStoreTest 单元测试以帮助我们更好的验证其正确性,并作为以后代码改动的基准线 |
@JohnNiang 只有比较简陋的测试流程 1、备份原博客 |
@guqing 加上了,有啥不对的地方你们那边应该可以直接改吧 |
Refactor unit test case for redis cache store
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your first contribution!
LGTM
hi @luoxmc, Congrats on merging your first pull request! 🎉🎉🎉 |
@guqing 刚刚仔细看了下代码,可能还是有点错误, 所以对应的单元测试类也需要修改 |
是的 你提醒的很对,如果redis是和其他系统共享的toMap就不正确,不过目前 toMap只用来遍历数据过滤到想要的,所以目前不会出错,run.halo.app.controller.content.auth.ContentAuthentication 在该类中有一个 |
* add new cache way - redis * Optimize redis operation * Remove public from CacheWrapper class * add redis cache unit test * refactor: test case for redis cache store Co-authored-by: guqing <1484563614@qq.com>
增加新的缓存处理方式 - redis缓存
以解决分布式部署halo时后台经常需要重新登陆的问题
关联issue地址 https://github.com/halo-dev/halo/issues/1505